Created
February 7, 2019 02:35
-
-
Save LFSCamargo/9434a149869926259e4e0e7f8cb49cc2 to your computer and use it in GitHub Desktop.
function types Typescript or flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function that executes a action and dont receive any params and returns void | |
type ChangesSomething = () => void | |
// Function that receives a string and returns a string | |
type FormatName = (name: string) => string | |
// Function that checks if a string is null and returns a boolean | |
type CheckNull = (value: string) => boolean | |
// Function that sums two numbers and returns a number | |
type Sum = (n1: number, n2: number) => number | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment