Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

Function signature type declarations

# Type or Interface

I needed to declare a function signature type for a callback function. I found this could be done using a type or interface. See TS docs for more on this.

interface Options {
  option1: string,
  option2: number
}

type CallBack {
  (name: string, options: Options) => void
}

# Type Assertion

let callBack: (name: string, options: Options) => void;

Search Results