Skip to content

Instantly share code, notes, and snippets.

@ashwinrs
Created May 17, 2018 22:04
Show Gist options
  • Save ashwinrs/b4fa941c4f769e97a3c436a33d65638f to your computer and use it in GitHub Desktop.
Save ashwinrs/b4fa941c4f769e97a3c436a33d65638f to your computer and use it in GitHub Desktop.
Function signature with return type in typescript
// This function takes two params and returns a variable of type Immutable.Map<String, any>.
// Function is just for explaining the format of a function in typescript. Functionally this function does not do anything :)
// param1 : Type is Immutable.Map<String, any>
// param2 : Type is number
// returns a value of type Immutable.Map<Strin, any>
const functionVar = (param1: Immutable.Map<String, any>, param2: number): Immutable.Map<String, any> => {
return state;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment