Skip to content

Instantly share code, notes, and snippets.

View SPY's full-sized avatar

Ilya Rezvov SPY

  • Google
  • Denver, USA
View GitHub Profile
@KiaraGrouwstra
KiaraGrouwstra / stdlib.ts
Last active March 24, 2020 03:17
Type-level standard library for TypeScript
// NOTE: code now moved to https://github.com/tycho01/typical
// older revision left here, but it no longer runs well in TS Playground
export type Obj<T> = { [k: string]: T };
export type NumObj<T> = { [k: number]: T };
// export type List = ArrayLike; // no unapplied generic types :(
export type List<T> = ArrayLike<T>;
// progress: https://github.com/Microsoft/TypeScript/issues/16392
export function force<T, V extends T>() {}