Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
XmchxUp committed Aug 22, 2024
1 parent ad7bad3 commit 592e15b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 2024/08/ts_type_system_rule110.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,24 +159,24 @@ type GenNTime<N extends Array<any>, State extends Array<Cell>> = N extends []
: [State, ...GenNTime<Tail<N>, NextState<State>>];

type N = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
type InitState = [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0];

let k: GenNTime<N, InitState> = 69;
let k: GenNTime<N, [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0]> = 69;

```

### 运行

```sh
$ make run
± % make run !3359
npm install

up to date, audited 3 packages in 716ms
added 2 packages, and audited 3 packages in 822ms

found 0 vulnerabilities
./node_modules/typescript/bin/tsc -noErrorTruncation rule110.ts | sed 's/\[/\n[/g'
rule110.ts(63,5): error TS2322: Type 'number' is not assignable to type '
[InitState,
rule110.ts(62,5): error TS2322: Type 'number' is not assignable to type '
[
[0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0],
[0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0],
[0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0],
Expand Down

0 comments on commit 592e15b

Please sign in to comment.