Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Merge branch 'master' into libReferenceDirective
  • Loading branch information
rbuckton committed Jun 6, 2017
commit 55ca456477fabbc9648017f61876eb7d0af99a3d
2 changes: 1 addition & 1 deletion Gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const librarySourceMap = [
"default.es2017=lib.es2017.full.d.ts",
"default.esnext=lib.esnext.full.d.ts",
].map(function (lib) {
var parts = lib.split("=", 2);
const parts = lib.split("=", 2);
return {
sources: ["header.d.ts", parts[0] + ".d.ts"],
target: parts[1] || ("lib." + parts[0] + ".d.ts")
Expand Down
12 changes: 10 additions & 2 deletions src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2176,14 +2176,22 @@
"category": "Error",
"code": 2710
},
"Cannot find lib definition for '{0}'.": {
"A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": {
"category": "Error",
"code": 2711
},
"Cannot find lib definition for '{0}'. Did you mean '{1}'?": {
"A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": {
"category": "Error",
"code": 2712
},
"Cannot find lib definition for '{0}'.": {
"category": "Error",
"code": 2713
},
"Cannot find lib definition for '{0}'. Did you mean '{1}'?": {
"category": "Error",
"code": 2714
},

"Import declaration '{0}' is using private name '{1}'.": {
"category": "Error",
Expand Down
12 changes: 6 additions & 6 deletions tests/baselines/reference/libReferenceDirectiveErrors.errors.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
tests/cases/compiler/a.ts(1,1): error TS1084: Invalid 'reference' directive syntax.
tests/cases/compiler/b.ts(1,1): error TS1084: Invalid 'reference' directive syntax.
tests/cases/compiler/c.ts(1,21): error TS2711: Cannot find lib definition for 'es2015.foo'.
tests/cases/compiler/d.ts(1,21): error TS2712: Cannot find lib definition for 'es2015.collections'. Did you mean 'es2015.collection'?
tests/cases/compiler/e.ts(1,21): error TS2712: Cannot find lib definition for 'lib.es2015.d.ts'. Did you mean 'es2015'?
tests/cases/compiler/c.ts(1,21): error TS2713: Cannot find lib definition for 'es2015.foo'.
tests/cases/compiler/d.ts(1,21): error TS2714: Cannot find lib definition for 'es2015.collections'. Did you mean 'es2015.collection'?
tests/cases/compiler/e.ts(1,21): error TS2714: Cannot find lib definition for 'lib.es2015.d.ts'. Did you mean 'es2015'?


==== tests/cases/compiler/a.ts (1 errors) ====
Expand All @@ -16,12 +16,12 @@ tests/cases/compiler/e.ts(1,21): error TS2712: Cannot find lib definition for 'l
==== tests/cases/compiler/c.ts (1 errors) ====
/// <reference lib="es2015.foo" />
~~~~~~~~~~
!!! error TS2711: Cannot find lib definition for 'es2015.foo'.
!!! error TS2713: Cannot find lib definition for 'es2015.foo'.
==== tests/cases/compiler/d.ts (1 errors) ====
/// <reference lib="es2015.collections" />
~~~~~~~~~~~~~~~~~~
!!! error TS2712: Cannot find lib definition for 'es2015.collections'. Did you mean 'es2015.collection'?
!!! error TS2714: Cannot find lib definition for 'es2015.collections'. Did you mean 'es2015.collection'?
==== tests/cases/compiler/e.ts (1 errors) ====
/// <reference lib="lib.es2015.d.ts" />
~~~~~~~~~~~~~~~
!!! error TS2712: Cannot find lib definition for 'lib.es2015.d.ts'. Did you mean 'es2015'?
!!! error TS2714: Cannot find lib definition for 'lib.es2015.d.ts'. Did you mean 'es2015'?
You are viewing a condensed version of this merge commit. You can view the full changes here.