9 Matching Annotations
- Nov 2021
-
-
Check whether a value is defined (non-nullable), meaning it is neither `null` or `undefined`. This can be useful as a type guard, as for example, `[1, null].filter(Boolean)` does not always type-guard correctly.
-
- Aug 2021
-
stackoverflow.com stackoverflow.com
-
the tuple() function you need can be succinctly written as: export type Lit = string | number | boolean | undefined | null | void | {}; export const tuple = <T extends Lit[]>(...args: T) => args;
-
- Oct 2020
-
firebase.google.com firebase.google.com
-
Emulating TypeScript functions
YEah, but you've also got to watch the source files to recomp0ile on changes....
"serve": "tsc -w | firebase emulators:start --only functions",
Modified and functionally watching my stuff
-
- Oct 2019
-
kwangyulseo.com kwangyulseo.com
-
bar: { (s: string): number; (n: number): string; }
-
-
www.albertgao.xyz www.albertgao.xyz
-
(name: string): string
-
- Sep 2019
-
stackoverflow.com stackoverflow.com
-
You have to augment the DateConstructor interface to add static properties:
-
-
stackoverflow.com stackoverflow.com
-
Since TypeScript 1.4 static extensions can be added easily. The TypeScript team changed the lib.d.ts file to use interfaces for all static type definitions. The static type definitions are all named like [Type]Constructor: So if you want to add a static function to type Object, then add your definition to ObjectConstructor.
-
-
github.com github.com
-
JsonSerializableStatic
-