Commit Graph
2472 Commits
Author SHA1 Message Date
Anders Hejlsberg bce15cb368 Fixing negated language version checks 2015-01-16 07:15:31 -08:00
Anders Hejlsberg c342b58b23 Adding reference to core.ts in sys.ts 2015-01-15 18:18:19 -08:00
Anders Hejlsberg 960d92f9b6 Default to all files only when none are specified in tsconfig.json 2015-01-15 17:12:45 -08:00
Anders Hejlsberg 65452aa011 Hardening compiler to accept empty CompilerOptions object 2015-01-15 15:57:08 -08:00
Anders Hejlsberg f9f95ba614 Support for tsconfig.json files in command-line compiler 2015-01-15 13:22:23 -08:00
Anders Hejlsberg cbecae3cf3 Merge pull request #1657 from Microsoft/unionTypeGuards
Improved union type guards
2015-01-13 11:59:54 -08:00
Vladimir Matveev 8256ddf756 Merge pull request #1647 from Microsoft/badPropNamesInConstEnums
disallow incorrect literal property names in indexed access for const en...
2015-01-13 11:33:30 -08:00
Mohamed Hegazy a99b958484 Manual port of fixe for #1593 from release-1.4 2015-01-13 09:30:54 -08:00
Anders Hejlsberg 59e266de02 Improved handing of union types in type guards 2015-01-12 14:51:20 -08:00
Dick van den Brink e4701a6600 Remove unused timer.ts file 2015-01-12 23:34:21 +01:00
Vladimir Matveev c25f3eb9a3 addressed CR feedback 2015-01-12 11:31:54 -08:00
Vladimir Matveev ecac4a519d disallow incorrect literal property names in indexed access for const enums 2015-01-12 10:58:21 -08:00
Lorant Pinter 47b8deb382 Show --noImplicitAny as an option to throw errors, not warnings
Fixes #1632
2015-01-11 11:14:06 +01:00
Anders Hejlsberg a8cf58939b Adding comment 2015-01-09 06:52:24 -08:00
Anders Hejlsberg bdfb655d66 Renaming helpers and cleaning up logic 2015-01-08 18:46:48 -08:00
Anders Hejlsberg 78bb71f837 Optimizing forEachChild function to not create closures 2015-01-08 16:43:37 -08:00
Anders Hejlsberg 40dc1341ab Merge pull request #1621 from Microsoft/narrowingOfAny
Type guard narrows type any in a primitive type check
2015-01-08 15:57:15 -08:00
Anders Hejlsberg 968a56924f Type guard narrows type any in a primitive type check 2015-01-08 14:27:39 -08:00
Vladimir Matveev 55628109c8 Merge pull request #1586 from Microsoft/copymap
extract map copying logic to a separate function
2015-01-08 14:22:02 -08:00
Daniel Rosenwasser 7b11621750 Merge pull request #1571 from Arnavion/1570-template-strings
Don't emit an empty template head literal if there's a template span with a non-empty literal.
2015-01-08 12:17:17 -08:00
Daniel Rosenwasser df4b3d2d37 Merge pull request #1547 from Microsoft/moveEmitHost
Moved EmitHost to utilities.ts so that it can be edited alone, and to fix resulting declaration file
2015-01-07 13:13:49 -08:00
Vladimir Matveev 4daa107cb4 Merge pull request #1614 from Microsoft/type_parameters_visibility
consider type parameters always visible
2015-01-07 12:41:47 -08:00
Daniel Rosenwasser f32683d231 Merge pull request #1529 from Microsoft/uninstantiatedModulesBeforeClasses
Allow uninstantiated modules before clodules
2015-01-07 12:40:50 -08:00
Daniel Rosenwasser 06d65c797d Moved EmitHost to utilities.ts 2015-01-07 12:37:46 -08:00
Vladimir Matveev 01218f86ff consider type parameters always visible 2015-01-06 17:55:54 -08:00
Arnavion b442d14e44 Don't emit an empty template head literal if there's a template span with a non-empty literal.
Fixes #1570
2015-01-06 15:28:06 -08:00
Arnavion 33534be268 Give MinusToken the same precedence as PlusToken for template expressions.
Fixes #1577
2015-01-06 02:42:02 -08:00
Jason Freeman 7518d15620 Remove unnecessary it block in generated .d.ts compilation in harness 2015-01-05 18:26:09 -08:00
Jason Freeman 6f6c46a99f Use getSourceFile instead of getSourceFiles in compileDeclarationFiles 2015-01-05 18:25:28 -08:00
Jason Freeman 7459c87265 Merge branch 'release-1.4'
Conflicts:
	bin/lib.core.es6.d.ts
	bin/lib.es6.d.ts
	bin/tsc.js
	bin/typescript.d.ts
	bin/typescriptServices.d.ts
	bin/typescriptServices.js
	bin/typescriptServices_internal.d.ts
	bin/typescript_internal.d.ts
2015-01-05 15:08:17 -08:00
Vladimir Matveev 06258b8c10 added parameter names to 'copymap' call site 2015-01-05 11:48:46 -08:00
Vladimir Matveev 363587163b extract map copying logic to a separate function 2015-01-02 12:14:02 -08:00
Cyrus Najmabadi 12cb284e5d CR feedback. 2014-12-29 16:23:11 -08:00
Cyrus Najmabadi a1d04c3c65 Merge branch 'master' into mergeMarkers1 2014-12-28 18:58:47 -08:00
Cyrus Najmabadi 52e15e7bee Enable incremental parsing by default. 2014-12-26 22:21:53 -08:00
Daniel Rosenwasser 8aefbe9a86 Removed newline. 2014-12-22 14:02:40 -08:00
Daniel Rosenwasser d907f99693 Moved EmitHost to types.ts so that utilities can be edited as a standalone file through dependency resolution. 2014-12-22 13:58:14 -08:00
Daniel RosenwasserandDaniel Rosenwasser 52ef460002 Undid comment change that made things more misleading. 2014-12-19 15:30:34 -08:00
Cyrus Najmabadi ff9f59c913 Remove unused constants. 2014-12-18 19:43:36 -08:00
Cyrus Najmabadi a6ea497ff1 Classify the '=' sign in variable/parameter/property as if it was an operator. 2014-12-18 19:38:19 -08:00
Cyrus Najmabadi 48bef4698b Provide better error recovery when we encounter merge markers in the source.
Previously we would just treat each merge marker as trivia and then continue
scanning and parsing like normal.  This worked well in some scenarios, but
fell down in others like:

```
class C {
    public foo() {
<<<<<<< HEAD
        this.bar();
    }
=======
        this.baz();
    }
>>>>>>> Branch

    public bar() { }
}
```

The problem stems from the previous approach trying to incorporate both branches of the merge into
the final tree.  In a case like this, that approach breaks down entirely.  The the parser ends up
seeing the close curly in both included sections, and it considers the class finished.  Then, it
starts erroring when it encounters "public bar()".

The fix is to only incorporate one of these sections into the tree.  Specifically, we only include
the first section.  The second sectoin is treated like trivia and does not affect the parse at all.
To make the experience more pleasant we do *lexically* classify the second section.  That way it
does not appear as just plain black text in the editor.  Instead, it will have appropriate lexicla
classifications for keywords, literals, comments, operators, punctuation, etc.  However, any syntactic
or semantic feature will not work in the second block due to this being trivia as far as any feature
is concerned.

This experience is still much better than what we had originally (where merge markers would absolutely)
destroy the parse tree.  And it is better than what we checked in last week, which could easily create
a borked tree for many types of merges.

Now, almost all merges should still leave the tree in good shape.  All LS features will work in the
first section, and lexical classification will work in the second.
2014-12-18 19:18:13 -08:00
Daniel Rosenwasser 4aa37691a1 Fixed issue where the second type's signature having type parameters would not cause an error. 2014-12-18 16:45:29 -08:00
Cyrus Najmabadi ef2087add5 Merge branch 'master' into layering 2014-12-18 12:20:32 -08:00
Daniel Rosenwasser af9b56bdd9 Merge pull request #1528 from Microsoft/goToDefOnUnionMethod
Fix crash on go-to-def on union method
2014-12-18 12:11:05 -08:00
Cyrus Najmabadi 67b2f13cce Merge branch 'master' into layering
Conflicts:
	src/compiler/parser.ts
2014-12-18 00:39:56 -08:00
Daniel Rosenwasser 6fed3e2601 Merge pull request #1501 from Arnavion/no-emit
Add -noEmit compiler flag that skips the emit stage in ts.compile()
2014-12-17 18:00:33 -08:00
Cyrus Najmabadi b155351e0a Remove unnecessary capture of the diagnostics type checker. 2014-12-17 17:06:12 -08:00
Daniel Rosenwasser fac5201765 Only error on non-ambient instantiated modules preceding clodules. 2014-12-17 17:00:42 -08:00
Anders Hejlsberg b2a02fe9ef Merge pull request #1443 from Microsoft/improvedTypeInference
Make initial inferences from parameterless function expressions
2014-12-17 16:19:49 -08:00
Cyrus Najmabadi b37b98138d Merge branch 'master' into layering
Conflicts:
	src/compiler/checker.ts
	src/compiler/utilities.ts
2014-12-17 15:35:30 -08:00