moved all methods of SourceFile to the part exposed on the services layer

This commit is contained in:
Vladimir Matveev
2015-01-22 11:10:12 -08:00
parent edc65e1753
commit e15f9349f9
+10 -4
View File
@@ -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<Statement>;
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);
}