Issue
TypeScript Version:
1.8.10
Hi.
I still have the error code TS1127 when I try to compile a file. I use the code from the quick tutorial.
Code :
function greeter(person: string){
return "Hello, " + person;
}
var user = [0, 1, 2];
document.body.innerHTML = greeter(user);
Expected behavior:
_greeter.ts(7,26):_Supplied parameters do not match any signature of call target_
Actual behavior:
greeter.ts(1,1): error TS1127: Invalid character.
greeter.ts(1,2): error TS1127: Invalid character.
greeter.ts(1,3): error TS1127: Invalid character.
greeter.ts(1,4): error TS1127: Invalid character.
Solution
(1,1): error TS1127: Invalid character.
The file contains an invalid unicode character at position 1,1
QuickFix
Create a new file and make sure it just contains the right characters
Better fix
Use a hex editor to figure out what went south.
Answered By - basarat
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.