Skip to content

Instantly share code, notes, and snippets.

@adz5a
Created September 6, 2017 14:54
Show Gist options
  • Save adz5a/4e6716d4d436c89e4924022ef23f1109 to your computer and use it in GitHub Desktop.
Save adz5a/4e6716d4d436c89e4924022ef23f1109 to your computer and use it in GitHub Desktop.
: error TS2322: Type '() => void' is not assignable to type 'Ca│~
llInterface'.
Type 'void' is not assignable to type 'number'.
/home/adza/work/ts-playground/node_modules/typescript/lib/tsc.js:2062
throw e;
^
Error: Debug Failure. False expression.
at computePositionOfLineAndCharacter (/home/adza/work/ts-playground/node_mod
ules/typescript/lib/tsc.js:3752:22)
at Object.getPositionOfLineAndCharacter (/home/adza/work/ts-playground/node_
modules/typescript/lib/tsc.js:3742:16)
at Object.formatDiagnosticsWithColorAndContext (/home/adza/work/ts-playgroun
d/node_modules/typescript/lib/tsc.js:55575:59)
at reportDiagnosticWithColorAndContext (/home/adza/work/ts-playground/node_m
odules/typescript/lib/tsc.js:58771:25)
at reportDiagnostic (/home/adza/work/ts-playground/node_modules/typescript/l
ib/tsc.js:58733:9)
at reportDiagnostics (/home/adza/work/ts-playground/node_modules/typescript/
lib/tsc.js:58738:13)
at compileProgram (/home/adza/work/ts-playground/node_modules/typescript/lib
/tsc.js:59099:13)
at compile (/home/adza/work/ts-playground/node_modules/typescript/lib/tsc.js
:59051:26)
at performCompilation (/home/adza/work/ts-playground/node_modules/typescript
/lib/tsc.js:58940:33)
at Object.executeCommandLine (/home/adza/work/ts-playground/node_modules/typ
escript/lib/tsc.js:58883:9)
at Object.<anonymous> (/home/adza/work/ts-playground/node_modules/typescript
/lib/tsc.js:59241:4)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/adza/work/ts-playground/node_modules/typescript
/bin/tsc:2:1)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
error Command failed with exit code 1.
interface CallInterface {
( a: string ): number;
}
const aFunction: CallInterface = () => {};
aFunction(2);
{
"name": "ts-playground",
"version": "0.0.1",
"dependencies": {
"tslint": "^5.7.0",
"typescript": "^2.5.2"
},
"scripts": {
"lint": "tslint -c tslint.json src/**/*/ts",
"compile": "tsc",
"watch": "tsc --watch"
}
}
{
"compilerOptions": {
"pretty": true,
"module": "es6",
"moduleResolution": "node",
"target": "es6",
"declaration": true,
"noEmitHelpers": true,
"removeComments": false,
"preserveConstEnums": true,
"sourceMap": true,
"outDir": "lib",
"diagnostics": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"noImplicitReturns": true
},
"exclude": [
"node_modules",
"lib"
],
"awesomeTypescriptLoaderOptions": {
"useBabel": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment