Commit graph

17803 commits

Author SHA1 Message Date
Ryan Cavanaugh f489f5af4d Merge pull request #15569 from RyanCavanaugh/new_refactor
Refactoring support
2017-05-19 11:23:46 -07:00
Ryan Cavanaugh f6fbe61718 Refactoring support (squash) 2017-05-19 10:45:49 -07:00
Andy 616edae4af Merge pull request #15954 from Microsoft/typeArgs
Unconditionally compute type arguments of class base type
2017-05-19 10:36:39 -07:00
Noel Varanda 4cd20b1335 Fix #15540: Throw error when importing @types (#15866)
* Fix #15540: Throw error when importing @types

Fix issue: #15540

- Modify checker; external imports to account for imported modules
containing '@types/'.
- Add diagnostic message.
- Add test case

* FIX-15540: Review changes

- Replace `substr` with `startsWith`
- move diagnostics message to more relevant place
- Add `removePrefix` helper function
2017-05-19 09:38:04 -07:00
Andy Hanson ce1e0097f0 Unconditionally compute type arguments of class base type 2017-05-19 08:56:56 -07:00
Andy 38ece3b703 Merge pull request #15737 from Microsoft/findAllRefs_module
Support find-all-references for a module specifier
2017-05-19 08:11:56 -07:00
Nathan Shively-Sanders 7325c89ab7 Merge pull request #15938 from Microsoft/retain-undefined-in-spreads-w/strictNullChecks
Retain undefined in spreads with strict null checks
2017-05-19 08:08:31 -07:00
Andy Hanson eec82408d5 Debug.assert(false) -> Debug.fail() 2017-05-19 07:43:09 -07:00
Nathan Shively-Sanders ada39c506d Merge pull request #15861 from Microsoft/improve-arity-error
Improve arity error messages
2017-05-18 15:26:12 -07:00
Ryan Cavanaugh 99357515cb Merge pull request #15924 from RyanCavanaugh/allowLocalPluginLoads
Add flag to allow local plugin loading
2017-05-18 14:39:43 -07:00
Nathan Shively-Sanders 4e03d7b0f6 Remove stale baselines 2017-05-18 14:01:57 -07:00
Nathan Shively-Sanders db3696c789 Test:retain undefined in spreads w/strictNullChecks
Add test case and update baselines with new errors
2017-05-18 13:59:07 -07:00
Nathan Shively-Sanders b9efe3e700 Retain undefined in spreads w/strictNullChecks
Previously, both optional and `| undefined` caused spread properties to
combine with preceding properties and drop the `undefined`. Now, with
strictNullChecks, optional and `| undefined` properties still combine
with preceding properties but don't drop the `undefined`.
2017-05-18 13:57:24 -07:00
Nathan Shively-Sanders 42d89681e9 Finish botched merge from master 2017-05-18 11:04:27 -07:00
Nathan Shively-Sanders f1a1b7fca9 Merge branch 'master' into improve-arity-error 2017-05-18 11:01:51 -07:00
Ryan Cavanaugh ab3ffa22da Add flag to allow local plugin loading 2017-05-17 19:52:57 -07:00
Andy 5e20c1ce11 Merge pull request #15910 from Microsoft/primitives
getAllPossiblePropertiesOfTypes: Skip primitives
2017-05-17 13:10:56 -07:00
Anders Hejlsberg afee4fbd84 Merge pull request #15486 from Microsoft/literalEnumTypes
String valued members in enums
2017-05-17 13:06:20 -07:00
Andy Hanson c4c9bf70c4 Add | undefined to test 2017-05-17 12:51:37 -07:00
Anders Hejlsberg 6a7b6d367b Accept new baselines 2017-05-17 11:59:33 -07:00
Anders Hejlsberg 947abf5d6b Merge branch 'master' into literalEnumTypes
# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/diagnosticMessages.json
#	src/compiler/types.ts
#	src/compiler/utilities.ts
#	src/services/completions.ts
2017-05-17 11:59:12 -07:00
Nathan Shively-Sanders 86661b5272 Merge pull request #13900 from Microsoft/object-literal-freshness-with-spread
Object literal freshness errors with spreads
2017-05-17 11:44:25 -07:00
Nathan Shively-Sanders fc306ba641 Merge pull request #15849 from Microsoft/allow-spread-after-required-params
Allow spreading arrays after required parameters
2017-05-17 09:14:20 -07:00
Andy ecbfdbf76f Merge pull request #15909 from Microsoft/isDeclarationFile
Remove 'isDeclarationFile()' function, use '.isDeclarationFile'
2017-05-17 09:12:25 -07:00
Andy Hanson b9c3a992e1 getAllPossiblePropertiesOfTypes: Skip primitives 2017-05-17 08:26:51 -07:00
Andy Hanson 0ff187c8ac Remove 'isDeclarationFile()' function, use '.isDeclarationFile' 2017-05-17 08:12:23 -07:00
Andy fc4dd2b4e5 Merge pull request #15890 from Microsoft/todoComments
Services utilities: Combine `isInsideComment` with `isInComment`
2017-05-17 07:09:33 -07:00
Arthur Ozga ebcbd8f828 Merge pull request #15790 from aozgaa/typeToStringViaTypeNode
Type to string via type node
2017-05-16 21:41:47 -07:00
Arthur Ozga 11019e4a4a Merge branch 'master' into typeToStringViaTypeNode 2017-05-16 15:35:31 -07:00
Arthur Ozga 0820f69270 respond to comments 2017-05-16 15:28:32 -07:00
Andy Hanson 0defde7185 Services utilities: Combine isInsideComment with isInComment 2017-05-16 15:05:46 -07:00
Andy ed7ae8060f Merge pull request #15880 from Microsoft/getDeclarationOfKind
getDeclarationOfKind: Improve type safety
2017-05-16 15:02:09 -07:00
Klaus Meinhardt 5fb77a0901 Update return types of APIs (#15887)
* Update types.ts

* Update types in parser.ts and scanner.ts
2017-05-16 14:13:58 -07:00
Andy 8ceaa33943 Merge pull request #15860 from Microsoft/no-filter
getTokenAtPositionWorker: Remove duplicate loop
2017-05-16 14:05:54 -07:00
Nathan Shively-Sanders bfa39d7c55 Merge pull request #15884 from Microsoft/fix-gulp-tsc-instrumented
Add target and lib references for tsc-instrumented
2017-05-16 13:38:34 -07:00
Nathan Shively-Sanders 56d04429b3 Add target and lib references for tsc-instrumented
I think they were previously provided implicitly.
2017-05-16 11:30:30 -07:00
Andy Hanson ea42644c8f Replace unnecessary let with two consts 2017-05-16 10:25:46 -07:00
Andy 7473dcc041 Merge pull request #15882 from Microsoft/findAncestor
findAncestor: Add generic overload for use with type predicates
2017-05-16 10:22:28 -07:00
Nathan Shively-Sanders 995f1a6757 Update baselines 2017-05-16 09:53:38 -07:00
Nathan Shively-Sanders 353d9e2310 Clean up original errors
The old "supplied parameters do not match any call signature" was
either inaccurate, redundant or vague. The previous commits fix the
vagueness problem. This commit fixes the inaccuracy and redundancy.

1. When there are NO candidates, the error should say so. (This only
happens once in our tests, when calling `super()` with a base class of
type `any` in a JS file.)
2. When the call is to a decorator, `resolveCall` already receives a
specific fallback error message from the decorator handling code. Adding
"supplied parameters do not match ..." is not helpful.

I also cleaned up the new code a bit after I noticed that all the error
creation functions take `string | number`, so I didn't need calls to
`toString` in my code.
2017-05-16 09:48:23 -07:00
Andy Hanson badfcbfb43 findAncestor: Add generic overload for use with type predicates 2017-05-16 09:45:01 -07:00
Andy Hanson ffa21fe271 getDeclarationOfKind: Improve type safety 2017-05-16 09:38:26 -07:00
Anders Hejlsberg 2a9a6e821f Merge pull request #15863 from Microsoft/fixRedundantTypeInference
Eliminate redundant work in type inference
2017-05-16 09:34:31 -07:00
Anders Hejlsberg ed1a6c10e2 Address CR feedback + defer creation of visited map 2017-05-16 09:12:32 -07:00
Nathan Shively-Sanders ca61755eb5 Update baselines with new error numbers 2017-05-16 08:07:04 -07:00
Nathan Shively-Sanders 381f056c68 Split error messages so they are localisable 2017-05-16 08:05:07 -07:00
Andy Hanson 2d3c7bae24 break -> continue 2017-05-16 07:10:38 -07:00
Arthur Ozga b2176c1872 no ascii escaping in param names 2017-05-15 19:11:36 -07:00
Arthur Ozga a9ab30c068 revert baselines 2017-05-15 18:43:06 -07:00
Arthur Ozga bba41a8a0c avoid ascii escaping literal text 2017-05-15 18:42:49 -07:00