Skip to content

Instantly share code, notes, and snippets.

@hachi8833
Last active Sep 4, 2020
Embed
What would you like to do?
Sample TS
type Digits = /* 上記参照 */;
type DigitsStr = `${Digits}`;
type Tile<T extends unknown[], N extends Digits | DigitsStr | 10 | '10'> = [
[],
[...T],
[...T, ...T],
[...T, ...T, ...T],
[...T, ...T, ...T, ...T],
[...T, ...T, ...T, ...T, ...T],
[...T, ...T, ...T, ...T, ...T, ...T],
[...T, ...T, ...T, ...T, ...T, ...T, ...T],
[...T, ...T, ...T, ...T, ...T, ...T, ...T, ...T],
[...T, ...T, ...T, ...T, ...T, ...T, ...T, ...T, ...T],
[...T, ...T, ...T, ...T, ...T, ...T, ...T, ...T, ...T, ...T],
][N];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment