Skip to content

Commit

Permalink
fix errors preventing update to typescript v4.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
smwhr committed Jun 10, 2023
1 parent 0d79d9e commit c1b57d6
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 56 deletions.
124 changes: 75 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"devDependencies": {
"@babel/core": "7.22.1",
"@babel/preset-env": "7.22.4",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-node-resolve": "13.3.0",
"@types/jest": "26.0.24",
"@types/node": "^20.2.6",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/eslint-plugin-tslint": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
Expand All @@ -40,8 +43,6 @@
"prettier": "2.8.8",
"remap-istanbul": "0.13.0",
"rollup": "2.79.1",
"@rollup/plugin-babel": "6.0.3",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-sourcemaps": "0.6.3",
"rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "0.34.1",
Expand Down
12 changes: 8 additions & 4 deletions script/inkjs-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,20 @@ if(jsonStory && play){
try{
story.ChoosePathString(target)
break;
}catch(e){
process.stdout.write(e.message + '\n');
}catch(e: unknown){
if (e instanceof Error) {
process.stdout.write(e.message + '\n');
}
}
}else{
const choiceIndex = parseInt(answer) - 1;
try{
story.ChooseChoiceIndex(choiceIndex);
break;
}catch(e){
process.stdout.write(e.message + '\n');
}catch(e: unknown){
if (e instanceof Error) {
process.stdout.write(e.message + '\n');
}
}
}
}while(true);
Expand Down
2 changes: 1 addition & 1 deletion src/engine/NativeFunctionCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class NativeFunctionCall extends InkObject {
return null;
}

public CallType<T>(parametersOfSingleType: Array<Value<T>>) {
public CallType<T extends { toString: () => string; }>(parametersOfSingleType: Array<Value<T>>) {

Check failure on line 124 in src/engine/NativeFunctionCall.ts

View workflow job for this annotation

GitHub Actions / CI tasks

Replace `;·}>(parametersOfSingleType:·Array<Value<T>>` with `·}>(⏎····parametersOfSingleType:·Array<Value<T>>⏎··`
let param1 = asOrThrows(parametersOfSingleType[0], Value);
let valType = param1.valueType;

Expand Down

0 comments on commit c1b57d6

Please sign in to comment.