Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hachi8833
Last active September 4, 2020 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hachi8833/a5832daa8c31be9f290ca4734075f297 to your computer and use it in GitHub Desktop.
Save hachi8833/a5832daa8c31be9f290ca4734075f297 to your computer and use it in GitHub Desktop.
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