About 50 results
Open links in new tab
  1. typescript - How to define type for a function callback (as any ...

    Note that ESLint gives some advice against using Function as a type directly -- quote "Don't use Function as a type. The Function type accepts any function-like value. It provides no type safety …

  2. All JavaScript Function Types? - Stack Overflow

    Jun 2, 2017 · While making several test projects for my small library of code I have come across many tutorials that go about making functions in many different ways. For example: Function Declarations

  3. How can I specify the function type in my type hints?

    Jun 15, 2016 · How can I specify the type hint of a variable as a function type? There is no typing.Function, and I could not find anything in the relevant PEP, PEP 483.

  4. Casting a function pointer to another type - Stack Overflow

    Calling a function pointer boils down to pushing the arguments on the stack and doing an indirect jump to the function pointer target, and there's obviously no notion of types at the machine code level. …

  5. Working with function types in Go - Stack Overflow

    If two functions have the same signature (parameter and result types), they share one function type. By writing type Greeting func... you're just giving a name to a particular function type, not defining a new …

  6. Is the return type part of the function signature?

    Nov 14, 2008 · The types of its parameters and, if the function is a class member, the cv- qualifiers (if any) on the function itself and the class in which the member function is declared. The signature of a …

  7. Getting "conflicting types for function" in C, why? - Stack Overflow

    Apr 6, 2017 · In "classic" C language (C89/90) when you call an undeclared function, C assumes that it returns an int and also attempts to derive the types of its parameters from the types of the actual …

  8. c++11 - C++ function types - Stack Overflow

    Jul 3, 2013 · I have a problem understanding function types (they appear e.g. as the Signature template parameter of a std::function): typedef int Signature(int); // the signature in question typedef std::func...

  9. Accept all types as argument in function - Stack Overflow

    Jan 23, 2015 · You may use more advanced techniques such as SFINAE to effectively overload those template functions, i.e. to use different templates for different kind of types T (i.e. integral types, …

  10. How to declare Return Types for Functions in TypeScript

    The TypeScript compiler will infer types when it can, and this is done you do not need to specify explicit types. so for the greeter example, greet () returns a string literal, which tells the compiler that the type …