@ -1,18 +1,18 @@
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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
THIS CODE IS PROVIDED ON AN * AS IS * BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND , EITHER EXPRESS OR IMPLIED , INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE , FITNESS FOR A PARTICULAR PURPOSE ,
MERCHANTABLITY OR NON - INFRINGEMENT .
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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
THIS CODE IS PROVIDED ON AN * AS IS * BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND , EITHER EXPRESS OR IMPLIED , INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE , FITNESS FOR A PARTICULAR PURPOSE ,
MERCHANTABLITY OR NON - INFRINGEMENT .
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
var _ _extends = ( this && this . _ _extends ) || function ( d , b ) {
for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
function _ _ ( ) { this . constructor = d ; }
@ -12838,8 +12838,8 @@ var ts;
}
function parseClassExpression ( ) {
return parseClassDeclarationOrExpression (
/*fullStart*/ scanner . getStartPos ( ) ,
/*decorators*/ undefined ,
/*fullStart*/ scanner . getStartPos ( ) ,
/*decorators*/ undefined ,
/*modifiers*/ undefined , 192 /* ClassExpression */ ) ;
}
function parseClassDeclaration ( fullStart , decorators , modifiers ) {
@ -16463,7 +16463,7 @@ var ts;
return false ;
}
if ( currentFlow === unreachableFlow ) {
var reportError =
var reportError =
// report error on all statements except empty ones
( ts . isStatement ( node ) && node . kind !== 201 /* EmptyStatement */ ) ||
// report error on class declarations
@ -29091,7 +29091,7 @@ var ts;
}
else {
var leadingError = ts . chainDiagnosticMessages ( undefined , ts . Diagnostics . A _type _predicate _s _type _must _be _assignable _to _its _parameter _s _type ) ;
checkTypeAssignableTo ( typePredicate . type , getTypeOfNode ( parent . parameters [ typePredicate . parameterIndex ] ) , node . type ,
checkTypeAssignableTo ( typePredicate . type , getTypeOfNode ( parent . parameters [ typePredicate . parameterIndex ] ) , node . type ,
/*headMessage*/ undefined , leadingError ) ;
}
}
@ -30236,7 +30236,7 @@ var ts;
// Since the javascript won't do semantic analysis like typescript,
// if the javascript file comes before the typescript file and both contain same name functions,
// checkFunctionOrConstructorSymbol wouldn't be called if we didnt ignore javascript function.
var firstDeclaration = ts . forEach ( localSymbol . declarations ,
var firstDeclaration = ts . forEach ( localSymbol . declarations ,
// Get first non javascript function declaration
function ( declaration ) { return declaration . kind === node . kind && ! ts . isSourceFileJavaScript ( ts . getSourceFileOfNode ( declaration ) ) ?
declaration : undefined ; } ) ;
@ -30853,7 +30853,7 @@ var ts;
}
else {
var leftType = checkExpression ( varExpr ) ;
checkReferenceExpression ( varExpr , /*invalidReferenceMessage*/ ts . Diagnostics . Invalid _left _hand _side _in _for _of _statement ,
checkReferenceExpression ( varExpr , /*invalidReferenceMessage*/ ts . Diagnostics . Invalid _left _hand _side _in _for _of _statement ,
/*constantVariableMessage*/ ts . Diagnostics . The _left _hand _side _of _a _for _of _statement _cannot _be _a _constant _or _a _read _only _property ) ;
// iteratedType will be undefined if the rightType was missing properties/signatures
// required to get its iteratedType (like [Symbol.iterator] or next). This may be
@ -32305,7 +32305,7 @@ var ts;
if ( ! node . parent . parent . moduleSpecifier ) {
var exportedName = node . propertyName || node . name ;
// find immediate value referenced by exported name (SymbolFlags.Alias is set so we don't chase down aliases)
var symbol = resolveName ( exportedName , exportedName . text , 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */ ,
var symbol = resolveName ( exportedName , exportedName . text , 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */ ,
/*nameNotFoundMessage*/ undefined , /*nameArg*/ undefined ) ;
if ( symbol && ( symbol === undefinedSymbol || isGlobalSourceFile ( getDeclarationContainer ( symbol . declarations [ 0 ] ) ) ) ) {
error ( exportedName , ts . Diagnostics . Cannot _export _0 _Only _local _declarations _can _be _exported _from _a _module , exportedName . text ) ;
@ -32800,7 +32800,7 @@ var ts;
}
}
if ( entityName . parent . kind === 235 /* ExportAssignment */ && ts . isEntityNameExpression ( entityName ) ) {
return resolveEntityName ( entityName ,
return resolveEntityName ( entityName ,
/*all meanings*/ 107455 /* Value */ | 793064 /* Type */ | 1920 /* Namespace */ | 8388608 /* Alias */ ) ;
}
if ( entityName . kind !== 172 /* PropertyAccessExpression */ && isInRightSideOfImportOrExportAssignment ( entityName ) ) {
@ -33389,7 +33389,7 @@ var ts;
}
function getReferencedValueSymbol ( reference ) {
return getNodeLinks ( reference ) . resolvedSymbol ||
resolveName ( reference , reference . text , 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */ ,
resolveName ( reference , reference . text , 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */ ,
/*nodeNotFoundMessage*/ undefined , /*nameArg*/ undefined ) ;
}
function getReferencedValueDeclaration ( reference ) {
@ -34750,7 +34750,7 @@ var ts;
sourceMapDir = ts . combinePaths ( host . getCommonSourceDirectory ( ) , sourceMapDir ) ;
sourceMapData . jsSourceMappingURL = ts . getRelativePathToDirectoryOrUrl ( ts . getDirectoryPath ( ts . normalizePath ( filePath ) ) , // get the relative sourceMapDir path based on jsFilePath
ts . combinePaths ( sourceMapDir , sourceMapData . jsSourceMappingURL ) , // this is where user expects to see sourceMap
host . getCurrentDirectory ( ) , host . getCanonicalFileName ,
host . getCurrentDirectory ( ) , host . getCanonicalFileName ,
/*isAbsolutePathAnUrl*/ true ) ;
}
else {
@ -34907,7 +34907,7 @@ var ts;
// If sourceroot option: Use the relative path corresponding to the common directory path
// otherwise source locations relative to map file location
var sourcesDirectoryPath = compilerOptions . sourceRoot ? host . getCommonSourceDirectory ( ) : sourceMapDir ;
var source = ts . getRelativePathToDirectoryOrUrl ( sourcesDirectoryPath , currentSourceFile . fileName , host . getCurrentDirectory ( ) , host . getCanonicalFileName ,
var source = ts . getRelativePathToDirectoryOrUrl ( sourcesDirectoryPath , currentSourceFile . fileName , host . getCurrentDirectory ( ) , host . getCanonicalFileName ,
/*isAbsolutePathAnUrl*/ true ) ;
sourceMapSourceIndex = ts . indexOf ( sourceMapData . sourceMapSources , source ) ;
if ( sourceMapSourceIndex === - 1 ) {
@ -35345,7 +35345,7 @@ var ts;
}
}
function emitEntityName ( entityName ) {
var visibilityResult = resolver . isEntityNameVisible ( entityName ,
var visibilityResult = resolver . isEntityNameVisible ( entityName ,
// Aliases can be written asynchronously so use correct enclosing declaration
entityName . parent . kind === 229 /* ImportEqualsDeclaration */ ? entityName . parent : enclosingDeclaration ) ;
handleSymbolAccessibilityError ( visibilityResult ) ;
@ -36524,7 +36524,7 @@ var ts;
ts . forEachExpectedEmitFile ( host , getDeclFileName , referencedFile ) ;
}
if ( declFileName ) {
declFileName = ts . getRelativePathToDirectoryOrUrl ( ts . getDirectoryPath ( ts . normalizeSlashes ( declarationFilePath ) ) , declFileName , host . getCurrentDirectory ( ) , host . getCanonicalFileName ,
declFileName = ts . getRelativePathToDirectoryOrUrl ( ts . getDirectoryPath ( ts . normalizeSlashes ( declarationFilePath ) ) , declFileName , host . getCurrentDirectory ( ) , host . getCanonicalFileName ,
/*isAbsolutePathAnUrl*/ false ) ;
referencesOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine ;
}
@ -38160,7 +38160,7 @@ var ts;
write ( "]" ) ;
}
else {
emitListWithSpread ( elements , /*needsUniqueCopy*/ true , /*multiLine*/ node . multiLine ,
emitListWithSpread ( elements , /*needsUniqueCopy*/ true , /*multiLine*/ node . multiLine ,
/*trailingComma*/ elements . hasTrailingComma , /*useConcat*/ true ) ;
}
}
@ -43426,7 +43426,7 @@ var ts;
}
}
function isUseStrictPrologue ( node ) {
return node . expression . text === "use strict" ;
return ( node . expression . text === "use strict" ) ;
}
function ensureUseStrictPrologue ( startWithNewLine , writeUseStrict ) {
if ( writeUseStrict ) {
@ -45819,7 +45819,7 @@ var ts;
modulesWithElidedImports [ file . path ] = true ;
}
else if ( shouldAddFile ) {
findSourceFile ( resolution . resolvedFileName , resolvedPath ,
findSourceFile ( resolution . resolvedFileName , resolvedPath ,
/*isDefaultLib*/ false , /*isReference*/ false , file , ts . skipTrivia ( file . text , file . imports [ i ] . pos ) , file . imports [ i ] . end ) ;
}
if ( isFromNodeModulesSearch ) {
@ -48226,7 +48226,7 @@ var ts;
for ( var _i = 0 , wordSpans _1 = wordSpans ; _i < wordSpans _1 . length ; _i ++ ) {
var span = wordSpans _1 [ _i ] ;
if ( partStartsWith ( candidate , span , chunk . text , /*ignoreCase:*/ true ) ) {
return createPatternMatch ( PatternMatchKind . substring , punctuationStripped ,
return createPatternMatch ( PatternMatchKind . substring , punctuationStripped ,
/*isCaseSensitive:*/ partStartsWith ( candidate , span , chunk . text , /*ignoreCase:*/ false ) ) ;
}
}
@ -49541,7 +49541,7 @@ var ts;
var children = n . getChildren ( ) ;
for ( var _i = 0 , children _1 = children ; _i < children _1 . length ; _i ++ ) {
var child = children _1 [ _i ] ;
var shouldDiveInChildNode =
var shouldDiveInChildNode =
// previous token is enclosed somewhere in the child
( child . pos <= previousToken . pos && child . end > previousToken . end ) ||
// previous token ends exactly at the beginning of child
@ -51624,7 +51624,7 @@ var ts;
///<reference path='ruleOperationContext.ts' />
///<reference path='rules.ts' />
///<reference path='rulesMap.ts' />
///<reference path='tokenRange.ts' />
///<reference path='tokenRange.ts' />
/// <reference path="references.ts"/>
/* @internal */
var ts ;
@ -53772,8 +53772,8 @@ var ts;
} ;
SignatureObject . prototype . getDocumentationComment = function ( ) {
if ( this . documentationComment === undefined ) {
this . documentationComment = this . declaration ? getJsDocCommentsFromDeclarations ( [ this . declaration ] ,
/*name*/ undefined ,
this . documentationComment = this . declaration ? getJsDocCommentsFromDeclarations ( [ this . declaration ] ,
/*name*/ undefined ,
/*canUseParsedParamTagComments*/ false ) : [ ] ;
}
return this . documentationComment ;
@ -57010,7 +57010,7 @@ var ts;
for ( var _i = 0 , _a = symbol . getDeclarations ( ) ; _i < _a . length ; _i ++ ) {
var declaration = _a [ _i ] ;
if ( ts . isClassLike ( declaration ) ) {
return tryAddSignature ( declaration . members ,
return tryAddSignature ( declaration . members ,
/*selectConstructors*/ true , symbolKind , symbolName , containerName , result ) ;
}
}
@ -61212,14 +61212,14 @@ var ts;
} ;
LanguageServiceShimObject . prototype . getEncodedSyntacticClassifications = function ( fileName , start , length ) {
var _this = this ;
return this . forwardJSONCall ( "getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")" ,
return this . forwardJSONCall ( "getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")" ,
// directly serialize the spans out to a string. This is much faster to decode
// on the managed side versus a full JSON array.
function ( ) { return convertClassifications ( _this . languageService . getEncodedSyntacticClassifications ( fileName , ts . createTextSpan ( start , length ) ) ) ; } ) ;
} ;
LanguageServiceShimObject . prototype . getEncodedSemanticClassifications = function ( fileName , start , length ) {
var _this = this ;
return this . forwardJSONCall ( "getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")" ,
return this . forwardJSONCall ( "getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")" ,
// directly serialize the spans out to a string. This is much faster to decode
// on the managed side versus a full JSON array.
function ( ) { return convertClassifications ( _this . languageService . getEncodedSemanticClassifications ( fileName , ts . createTextSpan ( start , length ) ) ) ; } ) ;
@ -61406,7 +61406,7 @@ var ts;
} ;
LanguageServiceShimObject . prototype . getEmitOutputObject = function ( fileName ) {
var _this = this ;
return forwardCall ( this . logger , "getEmitOutput('" + fileName + "')" ,
return forwardCall ( this . logger , "getEmitOutput('" + fileName + "')" ,
/*returnJson*/ false , function ( ) { return _this . languageService . getEmitOutput ( fileName ) ; } , this . logPerformance ) ;
} ;
return LanguageServiceShimObject ;