Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 1.07 KB

File metadata and controls

37 lines (30 loc) · 1.07 KB

[HIGHLIGHT]Support TypeScript 4.7 (#12896, #12897, #12898, #12900, #12921, #12924 by @sosukesuzuki)

Support TypeScript 4.7 new features!

interface Box<T> {
  value: T;
}
function makeBox<T>(value: T) {
  return { value };
}
const makeHammerBox = makeBox<Hammer>;
const makeWrenchBox = makeBox<Wrench>;
interface Animal {
  animalStuff: any;
}
interface Dog extends Animal {
  dogStuff: any;
}
type Getter<out T> = () => T;
type Setter<in T> = (value: T) => void;
type FirstString<T> = T extends [infer extends string, ...unknown[]]
  ? S
  : never;