Mark non-public API surface with the /* @internal */ comment

This commit is contained in:
Mohamed Hegazy
2015-04-09 14:18:14 -07:00
parent 9b0bbf926b
commit 1c91c2c5d0
33 changed files with 136 additions and 248 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
/// <reference path="parser.ts"/>
/* @internal */
module ts {
/* @internal */ export let bindTime = 0;
export let bindTime = 0;
export const enum ModuleInstanceState {
NonInstantiated = 0,
+2 -3
View File
@@ -1,19 +1,18 @@
/// <reference path="binder.ts"/>
/* @internal */
module ts {
let nextSymbolId = 1;
let nextNodeId = 1;
let nextMergeId = 1;
// @internal
export function getNodeId(node: Node): number {
if (!node.id) node.id = nextNodeId++;
return node.id;
}
/* @internal */ export let checkTime = 0;
export let checkTime = 0;
/* @internal */
export function getSymbolId(symbol: Symbol): number {
if (!symbol.id) {
symbol.id = nextSymbolId++;
+1 -1
View File
@@ -1,7 +1,7 @@
/// <reference path="types.ts"/>
/* @internal */
module ts {
// Ternary values are defined such that
// x & y is False if either x or y is False.
// x & y is Maybe if either x or y is Maybe, but neither x or y is False.
+1 -1
View File
@@ -1,7 +1,7 @@
/// <reference path="checker.ts"/>
/** @internal */
module ts {
interface ModuleElementDeclarationEmitInfo {
node: Node;
outputPos: number;
@@ -1,5 +1,6 @@
// <auto-generated />
/// <reference path="types.ts" />
/* @internal */
module ts {
export var Diagnostics = {
Unterminated_string_literal: { code: 1002, category: DiagnosticCategory.Error, key: "Unterminated string literal." },
+1 -1
View File
@@ -1,6 +1,7 @@
/// <reference path="checker.ts"/>
/// <reference path="declarationEmitter.ts"/>
/* @internal */
module ts {
// represents one LexicalEnvironment frame to store unique generated names
interface ScopeFrame {
@@ -20,7 +21,6 @@ module ts {
_n = 0x20000000, // Use/preference flag for '_n'
}
// @internal
// targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature
export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile): EmitResult {
// emit output for the __extends helper function
+9 -1
View File
@@ -2,11 +2,12 @@
/// <reference path="diagnosticInformationMap.generated.ts"/>
module ts {
/* @internal */
export interface ErrorCallback {
(message: DiagnosticMessage, length: number): void;
}
/* @internal */
export interface Scanner {
getStartPos(): number;
getToken(): SyntaxKind;
@@ -262,6 +263,7 @@ module ts {
return textToToken[s];
}
/* @internal */
export function computeLineStarts(text: string): number[] {
let result: number[] = new Array();
let pos = 0;
@@ -293,15 +295,18 @@ module ts {
return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character);
}
/* @internal */
export function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number {
Debug.assert(line >= 0 && line < lineStarts.length);
return lineStarts[line] + character;
}
/* @internal */
export function getLineStarts(sourceFile: SourceFile): number[] {
return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text));
}
/* @internal */
export function computeLineAndCharacterOfPosition(lineStarts: number[], position: number) {
let lineNumber = binarySearch(lineStarts, position);
if (lineNumber < 0) {
@@ -362,10 +367,12 @@ module ts {
return ch >= CharacterCodes._0 && ch <= CharacterCodes._9;
}
/* @internal */
export function isOctalDigit(ch: number): boolean {
return ch >= CharacterCodes._0 && ch <= CharacterCodes._7;
}
/* @internal */
export function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number {
while (true) {
let ch = text.charCodeAt(pos);
@@ -587,6 +594,7 @@ module ts {
ch > CharacterCodes.maxAsciiCharacter && isUnicodeIdentifierPart(ch, languageVersion);
}
/* @internal */
export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner {
let pos: number; // Current position (end position of text of current token)
let len: number; // Length of text
+90 -43
View File
@@ -320,6 +320,7 @@ module ts {
BlockScoped = Let | Const
}
/* @internal */
export const enum ParserContextFlags {
// Set if this node was parsed in strict mode. Used for grammar error checks, as well as
// checking if the node can be reused in incremental settings.
@@ -355,6 +356,7 @@ module ts {
HasAggregatedChildData = 1 << 7
}
/* @internal */
export const enum RelationComparisonResult {
Succeeded = 1, // Should be truthy
Failed = 2,
@@ -366,15 +368,15 @@ module ts {
flags: NodeFlags;
// Specific context the parser was in when this node was created. Normally undefined.
// Only set when the parser was in some interesting context (like async/yield).
parserContextFlags?: ParserContextFlags;
decorators?: NodeArray<Decorator>; // Array of decorators (in document order)
modifiers?: ModifiersArray; // Array of modifiers
id?: number; // Unique id (used to look up NodeLinks)
parent?: Node; // Parent node (initialized by binding)
symbol?: Symbol; // Symbol declared by node (initialized by binding)
locals?: SymbolTable; // Locals associated with node (initialized by binding)
nextContainer?: Node; // Next container in declaration order (initialized by binding)
localSymbol?: Symbol; // Local symbol declared by node (initialized by binding only for exported nodes)
/* @internal */ parserContextFlags?: ParserContextFlags;
decorators?: NodeArray<Decorator>; // Array of decorators (in document order)
modifiers?: ModifiersArray; // Array of modifiers
/* @internal */ id?: number; // Unique id (used to look up NodeLinks)
parent?: Node; // Parent node (initialized by binding)
/* @internal */ symbol?: Symbol; // Symbol declared by node (initialized by binding)
/* @internal */ locals?: SymbolTable; // Locals associated with node (initialized by binding)
/* @internal */ nextContainer?: Node; // Next container in declaration order (initialized by binding)
/* @internal */ localSymbol?: Symbol; // Local symbol declared by node (initialized by binding only for exported nodes)
}
export interface NodeArray<T> extends Array<T>, TextRange {
@@ -1001,11 +1003,12 @@ module ts {
hasNoDefaultLib: boolean;
// The first node that causes this file to be an external module
externalModuleIndicator: Node;
languageVersion: ScriptTarget;
identifiers: Map<string>;
// The first node that causes this file to be an external module
/* @internal */ externalModuleIndicator: Node;
/* @internal */ identifiers: Map<string>;
/* @internal */ nodeCount: number;
/* @internal */ identifierCount: number;
/* @internal */ symbolCount: number;
@@ -1033,6 +1036,9 @@ module ts {
}
export interface Program extends ScriptReferenceHost {
/**
* Get a list of files in the program
*/
getSourceFiles(): SourceFile[];
/**
@@ -1052,10 +1058,12 @@ module ts {
getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[];
getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[];
// Gets a type checker that can be used to semantically analyze source fils in the program.
/**
* Gets a type checker that can be used to semantically analyze source fils in the program.
*/
getTypeChecker(): TypeChecker;
getCommonSourceDirectory(): string;
/* @internal */ getCommonSourceDirectory(): string;
// For testing purposes only. Should not be used by any other consumers (including the
// language service).
@@ -1068,12 +1076,18 @@ module ts {
}
export interface SourceMapSpan {
emittedLine: number; // Line number in the .js file
emittedColumn: number; // Column number in the .js file
sourceLine: number; // Line number in the .ts file
sourceColumn: number; // Column number in the .ts file
nameIndex?: number; // Optional name (index into names array) associated with this span
sourceIndex: number; // .ts file (index into sources array) associated with this span*/
/** Line number in the .js file. */
emittedLine: number;
/** Column number in the .js file. */
emittedColumn: number;
/** Line number in the .ts file. */
sourceLine: number;
/** Column number in the .ts file. */
sourceColumn: number;
/** Optional name (index into names array) associated with this span. */
nameIndex?: number;
/** .ts file (index into sources array) associated with this span */
sourceIndex: number;
}
export interface SourceMapData {
@@ -1088,7 +1102,7 @@ module ts {
sourceMapDecodedMappings: SourceMapSpan[]; // Raw source map spans that were encoded into the sourceMapMappings
}
// Return code used by getEmitOutput function to indicate status of the function
/** Return code used by getEmitOutput function to indicate status of the function */
export enum ExitStatus {
// Compiler ran successfully. Either this was a simple do-nothing compilation (for example,
// when -version or -help was provided, or this was a normal compilation, no diagnostics
@@ -1105,7 +1119,7 @@ module ts {
export interface EmitResult {
emitSkipped: boolean;
diagnostics: Diagnostic[];
sourceMaps: SourceMapData[]; // Array of sourceMapData if compiler emitted sourcemaps
/* @internal */ sourceMaps: SourceMapData[]; // Array of sourceMapData if compiler emitted sourcemaps
}
export interface TypeCheckerHost {
@@ -1124,8 +1138,6 @@ module ts {
getIndexTypeOfType(type: Type, kind: IndexKind): Type;
getReturnTypeOfSignature(signature: Signature): Type;
// If 'predicate' is supplied, then only the first symbol in scope matching the predicate
// will be returned. Otherwise, all symbols in scope will be returned.
getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[];
getSymbolAtLocation(node: Node): Symbol;
getShorthandAssignmentValueSymbol(location: Node): Symbol;
@@ -1217,14 +1229,17 @@ module ts {
UseOnlyExternalAliasing = 0x00000002,
}
/* @internal */
export const enum SymbolAccessibility {
Accessible,
NotAccessible,
CannotBeNamed
}
/* @internal */
export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration;
/* @internal */
export interface SymbolVisibilityResult {
accessibility: SymbolAccessibility;
aliasesToMakeVisible?: AnyImportSyntax[]; // aliases that need to have this symbol visible
@@ -1232,10 +1247,12 @@ module ts {
errorNode?: Node; // optional node that results in error
}
/* @internal */
export interface SymbolAccessiblityResult extends SymbolVisibilityResult {
errorModuleName?: string // If the symbol is not visible from module, module's name
}
/* @internal */
export interface EmitResolver {
hasGlobalName(name: string): boolean;
getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string;
@@ -1340,19 +1357,20 @@ module ts {
}
export interface Symbol {
flags: SymbolFlags; // Symbol flags
name: string; // Name of symbol
id?: number; // Unique id (used to look up SymbolLinks)
mergeId?: number; // Merge id (used to look up merged symbol)
declarations?: Declaration[]; // Declarations associated with this symbol
parent?: Symbol; // Parent symbol
members?: SymbolTable; // Class, interface or literal instance members
exports?: SymbolTable; // Module exports
exportSymbol?: Symbol; // Exported symbol associated with this symbol
valueDeclaration?: Declaration // First value declaration of the symbol
constEnumOnlyModule?: boolean // True if module contains only const enums or other modules with only const enums
flags: SymbolFlags; // Symbol flags
name: string; // Name of symbol
/* @internal */ id?: number; // Unique id (used to look up SymbolLinks)
/* @internal */ mergeId?: number; // Merge id (used to look up merged symbol)
declarations?: Declaration[]; // Declarations associated with this symbol
/* @internal */ parent?: Symbol; // Parent symbol
members?: SymbolTable; // Class, interface or literal instance members
exports?: SymbolTable; // Module exports
/* @internal */ exportSymbol?: Symbol; // Exported symbol associated with this symbol
valueDeclaration?: Declaration; // First value declaration of the symbol
/* @internal */ constEnumOnlyModule?: boolean; // True if module contains only const enums or other modules with only const enums
}
/* @internal */
export interface SymbolLinks {
target?: Symbol; // Resolved (non-alias) target of an alias
type?: Type; // Type of value symbol
@@ -1364,12 +1382,14 @@ module ts {
exportsChecked?: boolean; // True if exports of external module have been checked
}
/* @internal */
export interface TransientSymbol extends Symbol, SymbolLinks { }
export interface SymbolTable {
[index: string]: Symbol;
}
/* @internal */
export const enum NodeCheckFlags {
TypeChecked = 0x00000001, // Node has been type checked
LexicalThis = 0x00000002, // Lexical 'this' reference
@@ -1386,6 +1406,7 @@ module ts {
EmitParam = 0x00000400, // Emit __param helper for decorators
}
/* @internal */
export interface NodeLinks {
resolvedType?: Type; // Cached type of type node
resolvedSignature?: Signature; // Cached signature of signature node or call expression
@@ -1418,27 +1439,34 @@ module ts {
Tuple = 0x00002000, // Tuple
Union = 0x00004000, // Union
Anonymous = 0x00008000, // Anonymous
/* @internal */
FromSignature = 0x00010000, // Created for signature assignment check
ObjectLiteral = 0x00020000, // Originates in an object literal
/* @internal */
ContainsUndefinedOrNull = 0x00040000, // Type is or contains Undefined or Null type
ContainsObjectLiteral = 0x00080000, // Type is or contains object literal type
/* @internal */
ContainsObjectLiteral = 0x00080000, // Type is or contains object literal type
ESSymbol = 0x00100000, // Type of symbol primitive introduced in ES6
/* @internal */
Intrinsic = Any | String | Number | Boolean | ESSymbol | Void | Undefined | Null,
/* @internal */
Primitive = String | Number | Boolean | ESSymbol | Void | Undefined | Null | StringLiteral | Enum,
StringLike = String | StringLiteral,
NumberLike = Number | Enum,
ObjectType = Class | Interface | Reference | Tuple | Anonymous,
/* @internal */
RequiresWidening = ContainsUndefinedOrNull | ContainsObjectLiteral
}
// Properties common to all types
export interface Type {
flags: TypeFlags; // Flags
id: number; // Unique ID
symbol?: Symbol; // Symbol associated with type (if any)
flags: TypeFlags; // Flags
/* @internal */ id: number; // Unique ID
symbol?: Symbol; // Symbol associated with type (if any)
}
/* @internal */
// Intrinsic types (TypeFlags.Intrinsic)
export interface IntrinsicType extends Type {
intrinsicName: string; // Name of intrinsic type
@@ -1471,6 +1499,7 @@ module ts {
// Generic class and interface types
export interface GenericType extends InterfaceType, TypeReference {
/* @internal */
instantiations: Map<TypeReference>; // Generic instantiation cache
}
@@ -1481,9 +1510,11 @@ module ts {
export interface UnionType extends Type {
types: Type[]; // Constituent types
/* @internal */
resolvedProperties: SymbolTable; // Cache of resolved properties
}
/* @internal */
// Resolved object or union type
export interface ResolvedType extends ObjectType, UnionType {
members: SymbolTable; // Properties by name
@@ -1497,7 +1528,9 @@ module ts {
// Type parameters (TypeFlags.TypeParameter)
export interface TypeParameter extends Type {
constraint: Type; // Constraint
/* @internal */
target?: TypeParameter; // Instantiation target
/* @internal */
mapper?: TypeMapper; // Instantiation mapper
}
@@ -1510,14 +1543,23 @@ module ts {
declaration: SignatureDeclaration; // Originating declaration
typeParameters: TypeParameter[]; // Type parameters (undefined if non-generic)
parameters: Symbol[]; // Parameters
/* @internal */
resolvedReturnType: Type; // Resolved return type
/* @internal */
minArgumentCount: number; // Number of non-optional parameters
/* @internal */
hasRestParameter: boolean; // True if last parameter is rest parameter
/* @internal */
hasStringLiterals: boolean; // True if specialized
/* @internal */
target?: Signature; // Instantiation target
/* @internal */
mapper?: TypeMapper; // Instantiation mapper
/* @internal */
unionSignatures?: Signature[]; // Underlying signatures of a union signature
/* @internal */
erasedSignatureCache?: Signature; // Erased version of signature (deferred)
/* @internal */
isolatedSignatureType?: ObjectType; // A manufactured type that just contains the signature for purposes of signature comparison
}
@@ -1526,6 +1568,7 @@ module ts {
Number,
}
/* @internal */
export interface TypeMapper {
(t: Type): Type;
}
@@ -1554,10 +1597,12 @@ module ts {
code: number;
}
// A linked list of formatted diagnostic messages to be used as part of a multiline message.
// It is built from the bottom up, leaving the head to be the "main" diagnostic.
// While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
// the difference is that messages are all preformatted in DMC.
/**
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
* While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage,
* the difference is that messages are all preformatted in DMC.
*/
export interface DiagnosticMessageChain {
messageText: string;
category: DiagnosticCategory;
@@ -1641,6 +1686,7 @@ module ts {
errors: Diagnostic[];
}
/* @internal */
export interface CommandLineOption {
name: string;
type: string | Map<number>; // "string", "number", "boolean", or an object literal mapping named values to actual values
@@ -1652,6 +1698,7 @@ module ts {
experimental?: boolean;
}
/* @internal */
export const enum CharacterCodes {
nullCharacter = 0,
maxAsciiCharacter = 0x7F,
+1
View File
@@ -1,5 +1,6 @@
/// <reference path="binder.ts" />
/** @internal */
module ts {
export interface ReferencePathMatchResult {
fileReference?: FileReference
+1
View File
@@ -3,6 +3,7 @@
/// <reference path='services.ts' />
/** @internal */
module ts.BreakpointResolver {
/**
* Get the breakpoint span in given sourceFile
+1
View File
@@ -3,6 +3,7 @@
///<reference path='rulesProvider.ts' />
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export interface TextRangeWithKind extends TextRange {
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/// <reference path="references.ts"/>
/** @internal */
module ts.formatting {
export class FormattingContext {
public currentTokenSpan: TextRangeWithKind;
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/// <reference path="references.ts"/>
/** @internal */
module ts.formatting {
export const enum FormattingRequestKind {
FormatDocument,
@@ -1,6 +1,7 @@
/// <reference path="formatting.ts"/>
/// <reference path="..\..\compiler\scanner.ts"/>
/** @internal */
module ts.formatting {
let scanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false);
-15
View File
@@ -1,18 +1,3 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='..\services.ts' />
///<reference path='formattingContext.ts' />
///<reference path='formattingRequestKind.ts' />
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export class Rule {
constructor(
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export const enum RuleAction {
Ignore = 0x00000001,
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export class RuleDescriptor {
constructor(public LeftTokenRange: Shared.TokenRange, public RightTokenRange: Shared.TokenRange) {
+2 -15
View File
@@ -1,20 +1,7 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export const enum RuleFlags {
None,
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export class RuleOperation {
public Context: RuleOperationContext;
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export class RuleOperationContext {
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export class Rules {
public getRuleName(rule: Rule) {
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export class RulesMap {
public map: RulesBucket[];
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/// <reference path="references.ts"/>
/** @internal */
module ts.formatting {
export class RulesProvider {
private globalRules: Rules;
+1
View File
@@ -1,5 +1,6 @@
///<reference path='..\services.ts' />
/** @internal */
module ts.formatting {
export module SmartIndenter {
+1 -15
View File
@@ -1,20 +1,6 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///<reference path='references.ts' />
/** @internal */
module ts.formatting {
export module Shared {
export interface ITokenAccess {
+1
View File
@@ -1,3 +1,4 @@
/** @internal */
module ts.NavigateTo {
type RawNavigateToItem = { name: string; fileName: string; matchKind: PatternMatchKind; isCaseSensitive: boolean; declaration: Declaration };
+1
View File
@@ -1,5 +1,6 @@
/// <reference path='services.ts' />
/** @internal */
module ts.NavigationBar {
export function getNavigationBarItems(sourceFile: SourceFile): ts.NavigationBarItem[] {
// If the source file has any child items, then it included in the tree
@@ -13,6 +13,7 @@
// limitations under the License.
//
/** @internal */
module ts {
export module OutliningElementsCollector {
export function collectElements(sourceFile: SourceFile): OutliningSpan[] {
+1
View File
@@ -1,3 +1,4 @@
/** @internal */
module ts {
// Note(cyrusn): this enum is ordered from strongest match type to weakest match type.
export enum PatternMatchKind {
+4 -1
View File
@@ -15,8 +15,10 @@
/// <reference path='services.ts' />
/* @internal */
var debugObjectHost = (<any>this);
/* @internal */
module ts {
export interface ScriptSnapshotShim {
/** Gets a portion of the script snapshot specified by [start, end). */
@@ -331,7 +333,6 @@ module ts {
}
}
/* @internal */
export function realizeDiagnostics(diagnostics: Diagnostic[], newLine: string): { message: string; start: number; length: number; category: string; } []{
return diagnostics.map(d => realizeDiagnostic(d, newLine));
}
@@ -844,8 +845,10 @@ module ts {
/// TODO: this is used by VS, clean this up on both sides of the interface
/* @internal */
module TypeScript.Services {
export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
}
/* @internal */
let toolsVersion = "1.4";
+1 -1
View File
@@ -1,5 +1,5 @@
///<reference path='services.ts' />
/** @internal */
module ts.SignatureHelp {
// A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression
+2
View File
@@ -1,4 +1,5 @@
// These utilities are common to multiple language service features.
/** @internal */
module ts {
export interface ListItemInfo {
listItemIndex: number;
@@ -500,6 +501,7 @@ module ts {
}
// Display-part writer helpers
/** @internal */
module ts {
export function isFirstDeclarationOfSymbolParameter(symbol: Symbol) {
return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === SyntaxKind.Parameter;