diff --git a/2024/08/ts_type_system_rule110.md b/2024/08/ts_type_system_rule110.md index 650ec81..75c8170 100644 --- a/2024/08/ts_type_system_rule110.md +++ b/2024/08/ts_type_system_rule110.md @@ -159,24 +159,24 @@ type GenNTime, State extends Array> = N extends [] : [State, ...GenNTime, NextState>]; 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 = 69; +let k: GenNTime = 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],