Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
20d8a94
Remove check narrowing only certain types, add test showing issues wi…
weswigham Feb 25, 2016
a2feb0e
string literal case test
weswigham Mar 11, 2016
92bf91d
Reconcile fix with CFA work
weswigham Apr 26, 2016
73d4aae
Defaultable -> NotNarrowable to align with use
weswigham Apr 26, 2016
70733da
Missed a defaultable in comments
weswigham Apr 26, 2016
a80529b
Add test for narrowing to unions of string literals
weswigham Apr 26, 2016
21587aa
Rewrite isInStringLiteral to accomodate for unterminated strings
mhegazy May 2, 2016
0a277a1
Refactor signatureHelp to expose helper functions
mhegazy May 2, 2016
060f2a8
Add support for completion in string literals
mhegazy May 2, 2016
7b0d664
Remove unused check
mhegazy May 2, 2016
4464a41
Merge branch 'master' into stringLiteralCompletions
mhegazy May 3, 2016
291ad33
Use const instead of let
mhegazy May 3, 2016
e5a32b7
Fix error
mhegazy May 3, 2016
02f30ff
Formatting changes
mhegazy May 3, 2016
b9ab4d3
Use shorthand properties
mhegazy May 3, 2016
f657e3c
Merge branch 'master' into stringLiteralCompletions
mhegazy May 8, 2016
81ee968
Add failing test for #8738
evansb May 22, 2016
63291d1
Sort baseline reference identifier by name
evansb May 22, 2016
9a4b6ab
Detects assignment to internal module export clause, fixes #8738
evansb May 22, 2016
4e415eb
add SharedArrayBuffer
YuichiNukiyama May 23, 2016
269ebda
Factor out assignment op check
evansb May 23, 2016
ec60ac9
Add test for composite assignment
evansb May 23, 2016
ebd4ce6
Factor out the behaviour and handles x++ and ++x
evansb May 23, 2016
f1ac06f
Handles ES3 default as identifier name
evansb May 23, 2016
eca9437
Fix missing else statement
evansb May 23, 2016
47eac4f
isNameOfExportedDeclarationInNonES6Module
evansb May 24, 2016
3b7814b
Reorder options alphabetically
mhegazy May 27, 2016
5d9c871
Mark diagnostics, and skipDefaultLibCheck as internal
mhegazy May 27, 2016
fa16a99
Allow an import of "foo.js" to be matched by a file "foo.ts"
May 31, 2016
a0546a9
Improve loadModuleFromFile code
May 31, 2016
f4d6b67
Respond to PR comments
May 31, 2016
d4b8889
Respond to more PR comments
May 31, 2016
9179f4c
Fix test
Jun 1, 2016
d111a0f
Merge branch 'master' into narrow-all-types
sandersn Jun 1, 2016
9a620bf
Actually merge from master
sandersn Jun 1, 2016
9575b3c
Revert to old tryLoad implementation
Jun 1, 2016
0e96c5e
Run fixupParentReferences when parsing isolated jsDocComment
zhengbli Jun 2, 2016
92177be
initial revision of unit test support for project system in tsserver
vladima Jun 2, 2016
3b19825
Allow wildcard ("*") patterns in ambient module declarations
Jun 2, 2016
2517238
Add non-widening forms of null and undefined
ahejlsberg Jun 2, 2016
5f3f2d3
Create separate control flows for property declarations with initiali…
ahejlsberg Jun 2, 2016
706683d
Add regression test
ahejlsberg Jun 2, 2016
4281bf5
Allow trailing commas in function parameter and argument lists
Jun 2, 2016
9f087cb
Merge pull request #8941 from Microsoft/controlFlowPropertyDeclarations
ahejlsberg Jun 2, 2016
20bab14
Add tests
ahejlsberg Jun 2, 2016
ef0f6c8
Merge pull request #7235 from weswigham/narrow-all-types
sandersn Jun 2, 2016
fb2df77
Remove unused variable
ahejlsberg Jun 2, 2016
7e00d7e
Merge pull request #8931 from Microsoft/tsserver-projectsystem-tests
vladima Jun 2, 2016
d41ac8a
Add null check and CR feedback
zhengbli Jun 2, 2016
7e9cb46
Support shorthand ambient module declarations
Jun 2, 2016
fc3e040
Revert "Merge pull request #7235 from weswigham/narrow-all-types"
sandersn Jun 2, 2016
e2a1a78
reuse the fixupParentReferences function
zhengbli Jun 2, 2016
24f15a4
Merge pull request #8946 from Microsoft/revert-narrow-all-types
sandersn Jun 2, 2016
131f759
Merge pull request #8930 from zhengbli/i8676
zhengbli Jun 2, 2016
3853555
Merge pull request #8944 from Microsoft/reviseWidening
ahejlsberg Jun 2, 2016
bcc9220
Improve typing of && operator with --strictNullChecks
ahejlsberg Jun 3, 2016
13698a9
Add test
ahejlsberg Jun 3, 2016
094f97e
Respond to PR comments
Jun 3, 2016
1541ebe
Respond to PR comments
Jun 3, 2016
ed6bfcd
Add merging tests
Jun 3, 2016
c8ced67
Use a function `stringify` to simplify calls to `JSON.stringify(xyz, …
Jun 3, 2016
8b0974a
Update tests
Jun 3, 2016
2bed32d
Fix mistake
Jun 3, 2016
e412f52
Include indent in navigation bar protocol
Jun 3, 2016
baebf2b
Merge pull request #8959 from Microsoft/stringify
Jun 3, 2016
3aaa4ea
Merge pull request #8957 from Microsoft/navbar_indent
Jun 3, 2016
39c4e8a
Remove unnecessary restrictions in property access narrowing
ahejlsberg Jun 4, 2016
a5e9071
Fix fourslash test
ahejlsberg Jun 4, 2016
87ee72b
Add regression test
ahejlsberg Jun 4, 2016
6dcd587
Merge pull request #8962 from Microsoft/propertyAccessNarrowing
ahejlsberg Jun 4, 2016
bb7818b
Consider property declarations to be control flow containers
ahejlsberg Jun 4, 2016
3b1effb
Adding regression test
ahejlsberg Jun 4, 2016
18a8758
Remove restriction on --target es5 and --module es6
mhegazy Jun 5, 2016
f5ab9d7
change type definition for Object.create
plantain-00 Jun 5, 2016
2fc2f5c
Fix signature help
Jun 6, 2016
f832488
Add "implicit any" warning for shorthand ambient modules
Jun 6, 2016
543b484
Remove trailing whitespace
Jun 3, 2016
13ddc34
Merge pull request #8979 from Microsoft/trailing_whitespace
Jun 6, 2016
447e583
Merge pull request #8974 from plantain-00/change_type_definition_for_…
mhegazy Jun 6, 2016
d9ec512
Support using string values in enums for CompilerOptions in transpile…
Jun 6, 2016
e05e112
Remove trailing whitespace in jakefile
Jun 6, 2016
1cbcdaf
Merge branch 'master' into transforms_mergemaster
Jun 6, 2016
52138e0
Make `jake runtests-browser` support test regexes with spaces
Jun 6, 2016
f215ac9
Add another test
Jun 6, 2016
a918730
factor out isJsxOrTsxExtension
Jun 6, 2016
cd1b9f0
Merge pull request #8989 from Microsoft/jakefile_whitespace
Jun 6, 2016
704f987
Move to a conformance test
Jun 6, 2016
9761c3b
Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-ty…
weswigham Jun 6, 2016
26b1ab4
Use inclusive flag, as originally done, but include almost everything
weswigham Jun 6, 2016
693cb9c
Add additional tests
Jun 6, 2016
2918c18
Merge pull request #8992 from Microsoft/runtests-browser-spaces
Jun 6, 2016
1fe8a08
Respond to PR comments
Jun 6, 2016
941c863
Fix typo
Jun 6, 2016
bfafecc
Merge pull request #8993 from weswigham/refix-primitive-narrowing
sandersn Jun 6, 2016
52d8a78
Merge pull request #8970 from Microsoft/propertyControlFlow
ahejlsberg Jun 7, 2016
3052913
add tests for tsserver project system
zhengbli Jun 7, 2016
53a5b42
Merge pull request #8994 from Microsoft/typo
Jun 7, 2016
ed48e58
Fix test
Jun 7, 2016
849ab7c
Merge pull request #8942 from Microsoft/param_trailing_commas
Jun 7, 2016
843aa6c
Allow case comparison to undefined and null in strict null checking mode
sandersn Jun 7, 2016
b4f1214
Remove incorrectly added tests
sandersn Jun 7, 2016
715ca12
Merge branch 'master' into transforms_mergemaster
Jun 7, 2016
5fef080
Merge pull request #9003 from Microsoft/caseUndefinedAndNull
sandersn Jun 7, 2016
d941177
check if moduleResolution when verifying that program can be reused
vladima Jun 7, 2016
6913c32
Merge pull request #9009 from Microsoft/reusing-program-missing-check
vladima Jun 7, 2016
37949a3
more tests for module resolution change and exclude
zhengbli Jun 7, 2016
78792df
Fix linting issues
zhengbli Jun 7, 2016
17cc206
Merge JSDoc of assignments from function expressions
sandersn Jun 7, 2016
8b7fb8e
Merge pull request #8739 from evansb/fix-8738
vladima Jun 7, 2016
6a243e3
Allow nested assignments in type guards
ahejlsberg Jun 8, 2016
cdf5b7a
Add tests
ahejlsberg Jun 8, 2016
cdf4cde
Merge pull request #9002 from zhengbli/moreTsserverTests
zhengbli Jun 8, 2016
6bf5f11
Improve order of parameter's merged jsdoc
sandersn Jun 8, 2016
65bbeb1
Force LF newlines for LKG builds/non debug builds
DickvdBrink Jun 8, 2016
d694146
Merge branch 'master' into transforms_mergemaster
Jun 8, 2016
83971d0
Create intersection types in type guards for unrelated types
ahejlsberg Jun 8, 2016
9832f62
Split commentsFunction test into expr/decl
sandersn Jun 8, 2016
1fe6626
Remove TODO comments
sandersn Jun 8, 2016
ea1bdff
Accept new baselines
ahejlsberg Jun 8, 2016
a57ee29
Add tests
ahejlsberg Jun 8, 2016
404650d
Merge pull request #9026 from DickvdBrink/lkg-newlines
mhegazy Jun 8, 2016
97270ce
Merge branch 'master' into reorderOptions
mhegazy Jun 8, 2016
7eb5f4b
Remove comments
mhegazy Jun 8, 2016
179d423
Merge pull request #9010 from Microsoft/merge-jsdoc-of-assignment-and…
sandersn Jun 8, 2016
d8667ae
Fix test helper
Jun 8, 2016
9027da4
Merge branch 'master' into stringLiteralCompletions
mhegazy Jun 8, 2016
899f667
Recognize relative path using in outDir property (#9025)
yuit Jun 8, 2016
cc5dd5b
Add comments
mhegazy Jun 8, 2016
d36d2b3
Merge pull request #8771 from YuichiNukiyama/fix8505
mhegazy Jun 8, 2016
6b8109a
Merge pull request #8850 from Microsoft/reorderOptions
mhegazy Jun 8, 2016
9fac99e
Add test case
sandersn Jun 8, 2016
17b5415
Merge pull request #8428 from Microsoft/stringLiteralCompletions
mhegazy Jun 8, 2016
de8ddd6
Return trace when exception happens
zhengbli Jun 8, 2016
1ebb85a
Merge branch 'master' into transforms_mergemaster
Jun 8, 2016
5a0ae4a
Remove Long-Done TODO
weswigham Jun 8, 2016
8f39f05
Merge pull request #9032 from zhengbli/printTrace
zhengbli Jun 8, 2016
7c1b28f
Allow primitive type guards with typeof on right
sandersn Jun 8, 2016
11377f9
Primitive type guards are now order independent
sandersn Jun 8, 2016
454ab50
Merge pull request #9035 from weswigham/patch-6
weswigham Jun 8, 2016
aeb1d97
Merge pull request #8949 from Microsoft/strictNullLogicalAnd
ahejlsberg Jun 8, 2016
b3c5c1d
Merge pull request #9013 from Microsoft/typeGuardNestedAssignment
ahejlsberg Jun 8, 2016
d182a59
Fix comments in tests
ahejlsberg Jun 8, 2016
8360bc7
Add handleing for classes
mhegazy Jun 8, 2016
33137f6
Add more tests for target=es5 module=es6
mhegazy Jun 8, 2016
6446827
addExportToArgumentListKind
mhegazy Jun 8, 2016
e7954cc
Merge branch 'transforms' into transforms_mergemaster
Jun 9, 2016
f42d8b8
Accept baseline
mhegazy Jun 9, 2016
475c1c2
Add more tests
mhegazy Jun 9, 2016
82505ea
Merge pull request #9040 from Microsoft/addExportToArgumentListKind
mhegazy Jun 9, 2016
f74a41a
wip-fixing transforms
Jun 9, 2016
19baf1f
Adds progress indicators to the runtests-parallel build task.
rbuckton Jun 9, 2016
8fc3422
Fixed typo
rbuckton Jun 9, 2016
b1a7498
Fix comment
ahejlsberg Jun 9, 2016
c14d711
Merge pull request #9043 from Microsoft/parallelTestProgress
rbuckton Jun 9, 2016
9e12290
Merge pull request #9031 from Microsoft/typeGuardIntersectionTypes
ahejlsberg Jun 9, 2016
0aa2fe3
Add test for out-of-range error
Jun 9, 2016
b08fe6f
Use proper method of not resolving alias
Jun 9, 2016
9ef9b74
Fix module loading error
Jun 9, 2016
59d27ed
Port 8739
Jun 9, 2016
c404ea7
Merge branch 'transforms_mergemaster' of https://github.com/Microsoft…
Jun 9, 2016
75b8293
Merge pull request #8988 from Microsoft/transpile_options
Jun 9, 2016
3ab1e27
Update tests
Jun 9, 2016
d36d9a3
Merge branch 'master' into transforms_mergemaster
Jun 9, 2016
06300e2
Update baselines
Jun 9, 2016
7a2ef42
Contextually type return statement in async function
Jun 9, 2016
3492542
Remove stale files
mhegazy Jun 9, 2016
5e72b8a
Undo change
Jun 9, 2016
03371c0
Improve perf
Jun 9, 2016
559b49b
Improve tests
Jun 9, 2016
3954e99
Merge pull request #9056 from Microsoft/async_function_return_type
Jun 9, 2016
512c671
Merge pull request #8895 from Microsoft/strip_extension
Jun 9, 2016
75c1d77
Merge branch 'master' into shorthand_ambient_module
Jun 9, 2016
88be1ac
Fix sourcemaps for debugging tests
weswigham Jun 9, 2016
b521fd5
Allow --sourceRoot with --inlineSources option
sheetalkamat Jun 9, 2016
0c64b0c
this in parameter initializers resolves to class
sandersn Jun 9, 2016
302cea8
Merge pull request #9054 from Microsoft/quick_info_meaning
Jun 9, 2016
9fa9710
Add tests for more kinds of import/export
Jun 9, 2016
a88366d
Merge branch 'master' into shorthand_ambient_module
Jun 9, 2016
9ffd00d
Merge pull request #8939 from Microsoft/pattern_ambient_modules
Jun 9, 2016
d0f669e
Merge pull request #9059 from Microsoft/remove-tsservicesinbrowser
weswigham Jun 9, 2016
574a64d
Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)
yuit Jun 9, 2016
e307295
Resolve function-this in parameter initialisers when explicitly provided
sandersn Jun 9, 2016
a4991b9
Merge pull request #9057 from Microsoft/sourceRootWithInlineSources
sheetalkamat Jun 9, 2016
a1e4b31
Allow null/undefined guard with null/undefined on left
sandersn Jun 9, 2016
f0a430a
Code review comments
mhegazy Jun 9, 2016
86a6959
Merge branch 'master' into primitive-type-guards-are-order-independent
sandersn Jun 9, 2016
2b46656
Merge pull request #9061 from Microsoft/fix-this-resolution-in-parame…
sandersn Jun 9, 2016
6923cba
Update more diagnostic messages ES6->2015
texastoland Jun 10, 2016
5af8ba8
Fixes an issue with runtests-parallel when global mocha is not instal…
rbuckton Jun 10, 2016
a1e4135
Merge pull request #9066 from Microsoft/fixRuntestsParallel
rbuckton Jun 10, 2016
6687f2c
Merge pull request #9065 from AppShipIt/8996-es6-diagnostic-messages
mhegazy Jun 10, 2016
e6eb36e
Update LKG
mhegazy Jun 10, 2016
ff6e025
Merge branch 'master' into shorthand_ambient_module
Jun 10, 2016
d973f4d
Merge branch 'master' into shorthand_ambient_module
Jun 10, 2016
077dfff
Add tests
Jun 10, 2016
71b7d44
Merge pull request #8945 from Microsoft/shorthand_ambient_module
Jun 10, 2016
97d7aa5
Merge pull request #9042 from Microsoft/ES6ModulesES5Target
mhegazy Jun 10, 2016
5ae0602
fix baselines
vladima Jun 10, 2016
72d64e1
Merge pull request #9084 from Microsoft/fixBaselines
vladima Jun 10, 2016
b027b4f
Recommend runtests-parallel in CONTRIBUTING
sandersn Jun 10, 2016
ccd4552
Merge pull request #9089 from Microsoft/recommend-runtests-parallel-i…
sandersn Jun 10, 2016
81d1ccf
Only inlineSourceMap when debugging through jake-browser (#9080)
yuit Jun 11, 2016
7a022ee
Manually port tests from PR 8470
Jun 11, 2016
6153422
minor fix: add missing return clause
plantain-00 Jun 13, 2016
d4b0dc8
Support using string values in enums for CompilerOptions in transpile…
Jun 6, 2016
cbd72fc
Support using string values in enums for CompilerOptions in transpile…
Jun 13, 2016
9afb10c
Fix test helper
Jun 8, 2016
64f875c
Add test for out-of-range error
Jun 9, 2016
121ab44
Fix module loading error
Jun 9, 2016
fb050f1
Use camel-case instead of snake-case (#9134)
yuit Jun 13, 2016
6f63799
Merge pull request #9129 from plantain-00/minor_fix_add_missing_retur…
mhegazy Jun 13, 2016
34c3f68
Manually add tests for PR 8988
Jun 13, 2016
784b841
Allow wildcard ("*") patterns in ambient module declarations
Jun 2, 2016
d44ae78
Respond to PR comments
Jun 3, 2016
28014a2
Add another test
Jun 6, 2016
abf33f6
Improve perf
Jun 9, 2016
e5a197f
Improve tests
Jun 9, 2016
8b09312
Merge pull request #9036 from Microsoft/primitive-type-guards-are-ord…
sandersn Jun 13, 2016
cad23ad
Merge branch 'master' into transforms_mergemaster
Jun 13, 2016
9c8aa62
Update baseline from merging with master
Jun 13, 2016
d5d2f8c
Address PR comment
Jun 13, 2016
9415385
Update baseline
Jun 13, 2016
55c5ab7
Refactor how we retrieve binding-name cache in module transformer
Jun 13, 2016
9752699
Temporary accept so we get a clean run-tests result
Jun 14, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove trailing whitespace
  • Loading branch information
Andy Hanson committed Jun 6, 2016
commit 543b484ec52371faae2c0ecb8aeba28de5e3695f
18 changes: 9 additions & 9 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11269,7 +11269,7 @@ namespace ts {
const declaringClassDeclaration = <ClassLikeDeclaration>getClassLikeDeclarationOfSymbol(declaration.parent.symbol);
const declaringClass = <InterfaceType>getDeclaredTypeOfSymbol(declaration.parent.symbol);

// A private or protected constructor can only be instantiated within it's own class
// A private or protected constructor can only be instantiated within it's own class
if (!isNodeWithinClass(node, declaringClassDeclaration)) {
if (flags & NodeFlags.Private) {
error(node, Diagnostics.Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration, typeToString(declaringClass));
Expand Down Expand Up @@ -16132,12 +16132,12 @@ namespace ts {
const symbol = getSymbolOfNode(node);
const target = resolveAlias(symbol);
if (target !== unknownSymbol) {
// For external modules symbol represent local symbol for an alias.
// For external modules symbol represent local symbol for an alias.
// This local symbol will merge any other local declarations (excluding other aliases)
// and symbol.flags will contains combined representation for all merged declaration.
// Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have,
// otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export*
// in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names).
// otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export*
// in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names).
const excludedMeanings =
(symbol.flags & (SymbolFlags.Value | SymbolFlags.ExportValue) ? SymbolFlags.Value : 0) |
(symbol.flags & SymbolFlags.Type ? SymbolFlags.Type : 0) |
Expand Down Expand Up @@ -16336,7 +16336,7 @@ namespace ts {
continue;
}
const { declarations, flags } = exports[id];
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
// ECMA262: 15.2.1.1 It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
// (TS Exceptions: namespaces, function overloads, enums, and interfaces)
if (flags & (SymbolFlags.Namespace | SymbolFlags.Interface | SymbolFlags.Enum)) {
continue;
Expand Down Expand Up @@ -17041,10 +17041,10 @@ namespace ts {
}

// Gets the type of object literal or array literal of destructuring assignment.
// { a } from
// { a } from
// for ( { a } of elems) {
// }
// [ a ] from
// [ a ] from
// [a] = [ some array ...]
function getTypeOfArrayLiteralOrObjectLiteralDestructuringAssignment(expr: Expression): Type {
Debug.assert(expr.kind === SyntaxKind.ObjectLiteralExpression || expr.kind === SyntaxKind.ArrayLiteralExpression);
Expand Down Expand Up @@ -17077,10 +17077,10 @@ namespace ts {
}

// Gets the property symbol corresponding to the property in destructuring assignment
// 'property1' from
// 'property1' from
// for ( { property1: a } of elems) {
// }
// 'property1' at location 'a' from:
// 'property1' at location 'a' from:
// [a] = [ property1, property2 ]
function getPropertySymbolOfDestructuringAssignment(location: Identifier) {
// Get the type of the object or array literal and then look for property of given name in the type
Expand Down
6 changes: 3 additions & 3 deletions src/compiler/declarationEmitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace ts {
// Emit reference in dts, if the file reference was not already emitted
if (referencedFile && !contains(emittedReferencedFiles, referencedFile)) {
// Add a reference to generated dts file,
// global file reference is added only
// global file reference is added only
// - if it is not bundled emit (because otherwise it would be self reference)
// - and it is not already added
if (writeReferencePath(referencedFile, !isBundledEmit && !addedGlobalFileReference)) {
Expand Down Expand Up @@ -148,7 +148,7 @@ namespace ts {

if (!isBundledEmit && isExternalModule(sourceFile) && sourceFile.moduleAugmentations.length && !resultHasExternalModuleIndicator) {
// if file was external module with augmentations - this fact should be preserved in .d.ts as well.
// in case if we didn't write any external module specifiers in .d.ts we need to emit something
// in case if we didn't write any external module specifiers in .d.ts we need to emit something
// that will force compiler to think that this file is an external module - 'export {}' is a reasonable choice here.
write("export {};");
writeLine();
Expand Down Expand Up @@ -766,7 +766,7 @@ namespace ts {

function emitExternalModuleSpecifier(parent: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration) {
// emitExternalModuleSpecifier is usually called when we emit something in the.d.ts file that will make it an external module (i.e. import/export declarations).
// the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered
// the only case when it is not true is when we call it to emit correct name for module augmentation - d.ts files with just module augmentations are not considered
// external modules since they are indistinguishable from script files with ambient modules. To fix this in such d.ts files we'll emit top level 'export {}'
// so compiler will treat them as external modules.
resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || parent.kind !== SyntaxKind.ModuleDeclaration;
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/sourcemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ namespace ts {
sourceMapData.sourceMapDecodedMappings[sourceMapData.sourceMapDecodedMappings.length - 1] :
defaultLastEncodedSourceMapSpan;

// TODO: Update lastEncodedNameIndex
// TODO: Update lastEncodedNameIndex
// Since we dont support this any more, lets not worry about it right now.
// When we start supporting nameIndex, we will get back to this

Expand Down
4 changes: 2 additions & 2 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ namespace ts {
return getTokenPosOfNode(node.jsDocComments[0]);
}

// For a syntax list, it is possible that one of its children has JSDocComment nodes, while
// the syntax list itself considers them as normal trivia. Therefore if we simply skip
// For a syntax list, it is possible that one of its children has JSDocComment nodes, while
// the syntax list itself considers them as normal trivia. Therefore if we simply skip
// trivia for the list, we may have skipped the JSDocComment as well. So we should process its
// first child to determine the actual position of its first token.
if (node.kind === SyntaxKind.SyntaxList && (<SyntaxList>node)._children.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/harness/projectsRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class ProjectRunner extends RunnerBase {
mapRoot: testCase.resolveMapRoot && testCase.mapRoot ? Harness.IO.resolvePath(testCase.mapRoot) : testCase.mapRoot,
sourceRoot: testCase.resolveSourceRoot && testCase.sourceRoot ? Harness.IO.resolvePath(testCase.sourceRoot) : testCase.sourceRoot,
module: moduleKind,
moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future
moduleResolution: ts.ModuleResolutionKind.Classic, // currently all tests use classic module resolution kind, this will change in the future
};
// Set the values specified using json
const optionNameMap: ts.Map<ts.CommandLineOption> = {};
Expand Down
2 changes: 1 addition & 1 deletion src/harness/runnerbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract class RunnerBase {

abstract enumerateTestFiles(): string[];

/** Setup the runner's tests so that they are ready to be executed by the harness
/** Setup the runner's tests so that they are ready to be executed by the harness
* The first test should be a describe/it block that sets up the harness's compiler instance appropriately
*/
public abstract initializeTests(): void;
Expand Down
18 changes: 9 additions & 9 deletions src/services/breakpoints.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0.
// See LICENSE.txt in the project root for complete license information.

/// <reference path='services.ts' />
Expand All @@ -19,8 +19,8 @@ namespace ts.BreakpointResolver {
if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) {
// Get previous token if the token is returned starts on new line
// eg: let x =10; |--- cursor is here
// let y = 10;
// token at position will return let keyword on second line as the token but we would like to use
// let y = 10;
// token at position will return let keyword on second line as the token but we would like to use
// token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line
tokenAtLocation = findPrecedingToken(tokenAtLocation.pos, sourceFile);

Expand Down Expand Up @@ -261,7 +261,7 @@ namespace ts.BreakpointResolver {
}

// Set breakpoint on identifier element of destructuring pattern
// a or ...c or d: x from
// a or ...c or d: x from
// [a, b, ...c] or { a, b } or { d: x } from destructuring pattern
if ((node.kind === SyntaxKind.Identifier ||
node.kind == SyntaxKind.SpreadElementExpression ||
Expand All @@ -275,7 +275,7 @@ namespace ts.BreakpointResolver {
const binaryExpression = <BinaryExpression>node;
// Set breakpoint in destructuring pattern if its destructuring assignment
// [a, b, c] or {a, b, c} of
// [a, b, c] = expression or
// [a, b, c] = expression or
// {a, b, c} = expression
if (isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.left)) {
return spanInArrayLiteralOrObjectLiteralDestructuringPattern(
Expand All @@ -285,8 +285,8 @@ namespace ts.BreakpointResolver {
if (binaryExpression.operatorToken.kind === SyntaxKind.EqualsToken &&
isArrayLiteralOrObjectLiteralDestructuringPattern(binaryExpression.parent)) {
// Set breakpoint on assignment expression element of destructuring pattern
// a = expression of
// [a = expression, b, c] = someExpression or
// a = expression of
// [a = expression, b, c] = someExpression or
// { a = expression, b, c } = someExpression
return textSpan(node);
}
Expand Down Expand Up @@ -403,7 +403,7 @@ namespace ts.BreakpointResolver {
const declarations = variableDeclaration.parent.declarations;
if (declarations && declarations[0] !== variableDeclaration) {
// If we cannot set breakpoint on this declaration, set it on previous one
// Because the variable declaration may be binding pattern and
// Because the variable declaration may be binding pattern and
// we would like to set breakpoint in last binding element if that's the case,
// use preceding token instead
return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));
Expand Down Expand Up @@ -549,7 +549,7 @@ namespace ts.BreakpointResolver {
return spanInNode(firstBindingElement);
}

// Could be ArrayLiteral from destructuring assignment or
// Could be ArrayLiteral from destructuring assignment or
// just nested element in another destructuring assignment
// set breakpoint on assignment when parent is destructuring assignment
// Otherwise set breakpoint for this element
Expand Down
4 changes: 2 additions & 2 deletions src/services/formatting/formattingScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ namespace ts.formatting {
return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current);
}

// when containing node in the tree is token
// when containing node in the tree is token
// but its kind differs from the kind that was returned by the scanner,
// then kind needs to be fixed. This might happen in cases
// then kind needs to be fixed. This might happen in cases
// when parser interprets token differently, i.e keyword treated as identifier
function fixTokenKind(tokenInfo: TokenInfo, container: Node): TokenInfo {
if (isToken(container) && tokenInfo.token.kind !== container.kind) {
Expand Down
6 changes: 3 additions & 3 deletions src/services/formatting/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,17 +554,17 @@ namespace ts.formatting {
static IsSameLineTokenOrBeforeMultilineBlockContext(context: FormattingContext): boolean {
//// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction.
////
//// Ex:
//// Ex:
//// if (1) { ....
//// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context
////
//// Ex:
//// Ex:
//// if (1)
//// { ... }
//// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we don't format.
////
//// Ex:
//// if (1)
//// if (1)
//// { ...
//// }
//// * ) and { are on different lines. We only need to format if the block is multiline context. So in this case we format.
Expand Down
4 changes: 2 additions & 2 deletions src/services/formatting/rulesMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ namespace ts.formatting {
//// 4- Context rules with any token combination
//// 5- Non-context rules with specific token combination
//// 6- Non-context rules with any token combination
////
////
//// The member rulesInsertionIndexBitmap is used to describe the number of rules
//// in each sub-bucket (above) hence can be used to know the index of where to insert
//// in each sub-bucket (above) hence can be used to know the index of where to insert
//// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits.
////
//// Example:
Expand Down
6 changes: 3 additions & 3 deletions src/services/navigateTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ namespace ts.NavigateTo {
// This means "compare in a case insensitive manner."
const baseSensitivity: Intl.CollatorOptions = { sensitivity: "base" };

// Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
// Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[]
forEach(program.getSourceFiles(), sourceFile => {
cancellationToken.throwIfCancellationRequested();

const nameToDeclarations = sourceFile.getNamedDeclarations();
for (const name in nameToDeclarations) {
const declarations = getProperty(nameToDeclarations, name);
if (declarations) {
// First do a quick check to see if the name of the declaration matches the
// First do a quick check to see if the name of the declaration matches the
// last portion of the (possibly) dotted name they're searching for.
let matches = patternMatcher.getMatchesForLastSegmentOfPattern(name);

Expand All @@ -26,7 +26,7 @@ namespace ts.NavigateTo {
}

for (const declaration of declarations) {
// It was a match! If the pattern has dots in it, then also see if the
// It was a match! If the pattern has dots in it, then also see if the
// declaration container matches as well.
if (patternMatcher.patternContainsDots) {
const containers = getContainers(declaration);
Expand Down
6 changes: 3 additions & 3 deletions src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2657,7 +2657,7 @@ namespace ts {
return false;
}

/**
/**
* Returns the containing object literal property declaration given a possible name node, e.g. "a" in x = { "a": 1 }
*/
function getContainingObjectLiteralElement(node: Node): ObjectLiteralElement {
Expand Down Expand Up @@ -7604,11 +7604,11 @@ namespace ts {

function isValidBraceCompletionAtPostion(fileName: string, position: number, openingBrace: number): boolean {

// '<' is currently not supported, figuring out if we're in a Generic Type vs. a comparison is too
// '<' is currently not supported, figuring out if we're in a Generic Type vs. a comparison is too
// expensive to do during typing scenarios
// i.e. whether we're dealing with:
// var x = new foo<| ( with class foo<T>{} )
// or
// or
// var y = 3 <|
if (openingBrace === CharacterCodes.lessThan) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/services/shims.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ namespace ts {

constructor(private shimHost: LanguageServiceShimHost) {
// if shimHost is a COM object then property check will become method call with no arguments.
// 'in' does not have this effect.
// 'in' does not have this effect.
if ("getModuleResolutionsForFile" in this.shimHost) {
this.resolveModuleNames = (moduleNames: string[], containingFile: string) => {
const resolutionsInFile = <Map<string>>JSON.parse(this.shimHost.getModuleResolutionsForFile(containingFile));
Expand Down Expand Up @@ -966,7 +966,7 @@ namespace ts {
return this.forwardJSONCall(
"getPreProcessedFileInfo('" + fileName + "')",
() => {
// for now treat files as JavaScript
// for now treat files as JavaScript
const result = preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()), /* readImportFiles */ true, /* detectJavaScriptImports */ true);
return {
referencedFiles: this.convertFileReferences(result.referencedFiles),
Expand Down
Loading