diff --git a/src/services/services.ts b/src/services/services.ts index 1b94899a1f5..55aa3d7b7cc 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -64,6 +64,8 @@ module ts { getLineAndCharacterFromPosition(pos: number): LineAndCharacter; getLineStarts(): number[]; getPositionFromLineAndCharacter(line: number, character: number): number; + getSyntacticDiagnostics(): Diagnostic[]; + update(newText: string, textChangeRange: TextChangeRange): SourceFile; } /** @@ -729,10 +731,6 @@ module ts { public statements: NodeArray; public endOfFileToken: Node; - // These methods will have their implementation provided by the implementation the - // compiler actually exports off of SourceFile. - public update: (newText: string, textChangeRange: TextChangeRange) => SourceFile; - public amdDependencies: string[]; public amdModuleName: string; public referencedFiles: FileReference[]; @@ -754,6 +752,14 @@ module ts { private namedDeclarations: Declaration[]; + public getSyntacticDiagnostics(): Diagnostic[]{ + return getSyntacticDiagnostics(this); + } + + public update(newText: string, textChangeRange: TextChangeRange): SourceFile { + return updateSourceFile(this, newText, textChangeRange); + } + public getLineAndCharacterFromPosition(position: number): LineAndCharacter { return getLineAndCharacterOfPosition(this, position); }