Skip to content

Commit 1c91c2c

Browse files
committed
Mark non-public API surface with the /* @internal */ comment
1 parent 9b0bbf9 commit 1c91c2c

33 files changed

Lines changed: 138 additions & 250 deletions

src/compiler/binder.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/// <reference path="parser.ts"/>
22

3+
/* @internal */
34
module ts {
4-
/* @internal */ export let bindTime = 0;
5+
export let bindTime = 0;
56

67
export const enum ModuleInstanceState {
78
NonInstantiated = 0,

src/compiler/checker.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
/// <reference path="binder.ts"/>
22

3+
/* @internal */
34
module ts {
45
let nextSymbolId = 1;
56
let nextNodeId = 1;
67
let nextMergeId = 1;
78

8-
// @internal
99
export function getNodeId(node: Node): number {
1010
if (!node.id) node.id = nextNodeId++;
1111
return node.id;
1212
}
1313

14-
/* @internal */ export let checkTime = 0;
14+
export let checkTime = 0;
1515

16-
/* @internal */
1716
export function getSymbolId(symbol: Symbol): number {
1817
if (!symbol.id) {
1918
symbol.id = nextSymbolId++;

src/compiler/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference path="types.ts"/>
22

3+
/* @internal */
34
module ts {
4-
55
// Ternary values are defined such that
66
// x & y is False if either x or y is False.
77
// x & y is Maybe if either x or y is Maybe, but neither x or y is False.

src/compiler/declarationEmitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference path="checker.ts"/>
22

3+
/** @internal */
34
module ts {
4-
55
interface ModuleElementDeclarationEmitInfo {
66
node: Node;
77
outputPos: number;

src/compiler/diagnosticInformationMap.generated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// <auto-generated />
22
/// <reference path="types.ts" />
3+
/* @internal */
34
module ts {
45
export var Diagnostics = {
56
Unterminated_string_literal: { code: 1002, category: DiagnosticCategory.Error, key: "Unterminated string literal." },

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// <reference path="checker.ts"/>
22
/// <reference path="declarationEmitter.ts"/>
33

4+
/* @internal */
45
module ts {
56
// represents one LexicalEnvironment frame to store unique generated names
67
interface ScopeFrame {
@@ -20,7 +21,6 @@ module ts {
2021
_n = 0x20000000, // Use/preference flag for '_n'
2122
}
2223

23-
// @internal
2424
// targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature
2525
export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile): EmitResult {
2626
// emit output for the __extends helper function

src/compiler/scanner.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
/// <reference path="diagnosticInformationMap.generated.ts"/>
33

44
module ts {
5-
5+
/* @internal */
66
export interface ErrorCallback {
77
(message: DiagnosticMessage, length: number): void;
88
}
99

10+
/* @internal */
1011
export interface Scanner {
1112
getStartPos(): number;
1213
getToken(): SyntaxKind;
@@ -262,6 +263,7 @@ module ts {
262263
return textToToken[s];
263264
}
264265

266+
/* @internal */
265267
export function computeLineStarts(text: string): number[] {
266268
let result: number[] = new Array();
267269
let pos = 0;
@@ -293,15 +295,18 @@ module ts {
293295
return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character);
294296
}
295297

298+
/* @internal */
296299
export function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number {
297300
Debug.assert(line >= 0 && line < lineStarts.length);
298301
return lineStarts[line] + character;
299302
}
300303

304+
/* @internal */
301305
export function getLineStarts(sourceFile: SourceFile): number[] {
302306
return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));
303307
}
304308

309+
/* @internal */
305310
export function computeLineAndCharacterOfPosition(lineStarts: number[], position: number) {
306311
let lineNumber = binarySearch(lineStarts, position);
307312
if (lineNumber < 0) {
@@ -362,10 +367,12 @@ module ts {
362367
return ch >= CharacterCodes._0 && ch <= CharacterCodes._9;
363368
}
364369

370+
/* @internal */
365371
export function isOctalDigit(ch: number): boolean {
366372
return ch >= CharacterCodes._0 && ch <= CharacterCodes._7;
367373
}
368374

375+
/* @internal */
369376
export function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number {
370377
while (true) {
371378
let ch = text.charCodeAt(pos);
@@ -587,6 +594,7 @@ module ts {
587594
ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch, languageVersion);
588595
}
589596

597+
/* @internal */
590598
export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner {
591599
let pos: number; // Current position (end position of text of current token)
592600
let len: number; // Length of text

0 commit comments

Comments
 (0)