Closed zlumer closed 11 years ago
Thanks for the detailed report. That looks as if the lib.d.ts
file isn't found, so the string properties are unknown.
Try editing the file typescript-tools/bin/defaultLibs.d.ts
to point the reference path to your TypeScript installation's lib.d.ts
. Then completion should work.
Thanks for the quick and helpful answer! I added the reference to the beginning of the file and now everything works:
///<reference path='../external/typescript/bin/lib.d.ts'/>
var s:string = ""; s.
C:\dev\TS>node external\typescript-tools.git\bin\tss.js src\competion.ts "loaded C:/dev/TS/src/competion.ts, TSS listening.." completions true 2 21 C:/dev/TS/src/competion.ts {"maybeInaccurate":false,"isMemberCompletion":true,"entries":[{"name":"toString","type":"() => string","kind":"method","kindModifiers":"declare,public "},{"name":"charAt","type":"(pos: number) => string","kind":"method","kindModifiers":"declare,public"},{"name":"charCodeAt","type":"(index: number) => number","kind":"method","kindModifiers":"declare,public"},{"name":"concat","type":"(...strings: string[]) => string","kind":"method","kindModifiers": "declare,public"},{"name":"indexOf","type":"(searchString: string, position?: number) => number","kind":"method","kindModifiers":"declare,public"},{"n ame":"lastIndexOf","type":"(searchString: string, position?: number) => number","kind":"method","kindModifiers":"declare,public"},{"name":"localeCompa re","type":"(that: string) => number","kind":"method","kindModifiers":"declare,public"},{"name":"match","type":"{ (regexp: string): string[]; (regexp: RegExp): string[]; }","kind":"method","kindModifiers":"declare,public"},{"name":"replace","type":"{ (searchValue: string, replaceValue: string): stri ng; (searchValue: string, replaceValue: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; ( searchValue: RegExp, replaceValue: (substring: string, ...args: any[]) => string): string; }","kind":"method","kindModifiers":"declare,public"},{"name ":"search","type":"{ (regexp: string): number; (regexp: RegExp): number; }","kind":"method","kindModifiers":"declare,public"},{"name":"slice","type":" (start: number, end?: number) => string","kind":"method","kindModifiers":"declare,public"},{"name":"split","type":"{ (seperator: string, limit?: numbe r): string[]; (seperator: RegExp, limit?: number): string[]; }","kind":"method","kindModifiers":"declare,public"},{"name":"substring","type":"(start: number, end?: number) => string","kind":"method","kindModifiers":"declare,public"},{"name":"toLowerCase","type":"() => string","kind":"method","kindMo difiers":"declare,public"},{"name":"toLocaleLowerCase","type":"() => string","kind":"method","kindModifiers":"declare,public"},{"name":"toUpperCase"," type":"() => string","kind":"method","kindModifiers":"declare,public"},{"name":"toLocaleUpperCase","type":"() => string","kind":"method","kindModifier s":"declare,public"},{"name":"trim","type":"() => string","kind":"method","kindModifiers":"declare,public"},{"name":"substr","type":"(from: number, le ngth?: number) => string","kind":"method","kindModifiers":"declare,public"},{"name":"length","type":"number","kind":"property","kindModifiers":"public "}]}
Hello
I tried using TSS a couple times and can't get completion to work. All the type or definition searches are correct, but I get an empty array for completions. Source file content:
(it doesn't work with line breaks too, I removed them only for easier testing)
Look at the output below:
As you can see, I get a correct definition or type result, but member completion is empty.
Do you know what the problem can be? And maybe you can reproduce this error, too.
Thanks.