About 13,700 results
Open links in new tab
  1. TypeScript: Documentation - More on Functions

    The JavaScript specification states that you cannot have a parameter called this, and so TypeScript uses that syntax space to let you declare the type for this in the function body.

  2. TypeScript Function Types

    in this tutorial, you will learn about the TypeScript function types that allow you to define types for functions.

  3. typescript - How to define type for a function callback (as any ...

    Typescript from v1.4 has the type keyword which declares a type alias (analogous to a typedef in C/C++). You can declare your callback type thus: which declares a function that takes no arguments …

  4. TypeScript Functions Type - GeeksforGeeks

    Jan 22, 2025 · There are several types of functions in TypeScript, which are listed below. We will explore these function types along with their basic implementations and examples.

  5. TypeScript Functions - W3Schools

    Function parameters are typed with a similar syntax as variable declarations. If no parameter type is defined, TypeScript will default to using any, unless additional type information is available as shown …

  6. TypeScript Function Type: Guide and Best Practices - DhiWise

    Aug 27, 2025 · Learn how to use TypeScript function types with parameters, return types, and call signatures. Explore examples, overloads, and best practices to write safe and maintainable functions …

  7. TypeScript Function Types | Coddy Reference

    Learn about function types in TypeScript, including syntax, usage, and best practices. Discover how to define and use function types to improve your TypeScript code.

  8. Function Types - Functions and Types

    Practice with the examples below! Functions in TypeScript are supercharged! You can define exactly what goes in and what comes out, making them safer and easier to use. Let's explore how …

  9. TypeScript function types - Graphite.dev

    This guide will explore how to work with function types in TypeScript, including defining function types, specifying return types, and using arrow functions and async functions.

  10. Typing functions • Exploring TypeScript

    TypeScript’s type inference takes such functions into consideration. For example, the inferred return type of returnStringIfTrue() is string because we invoke throwError() in line A.