-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Library directives support #7775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
05444ea
75922c4
aaaa9c0
12d90f3
a4f30ff
25e9226
ecbbe02
e2a23fd
46d28f1
e5e7d47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -317,9 +317,32 @@ namespace ts { | |
} | ||
}, | ||
{ | ||
name: "traceModuleResolution", | ||
name: "typesSearchPaths", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should mark this experimental as the semantics around this are still somewhat up for debate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at this point this is tsconfig only option and since it lacks description it is already excluded from the list of possible command line options. I think all these hides it well enough. |
||
type: "list", | ||
isTSConfigOnly: true, | ||
element: { | ||
name: "typesSearchPaths", | ||
type: "string", | ||
isFilePath: true | ||
} | ||
}, | ||
{ | ||
name: "typesRoot", | ||
type: "string" | ||
}, | ||
{ | ||
name: "types", | ||
type: "list", | ||
element: { | ||
name: "types", | ||
type: "string" | ||
}, | ||
description: Diagnostics.Type_declaration_files_to_be_included_in_compilation | ||
}, | ||
{ | ||
name: "traceResolution", | ||
type: "boolean", | ||
description: Diagnostics.Enable_tracing_of_the_module_resolution_process | ||
description: Diagnostics.Enable_tracing_of_the_name_resolution_process | ||
}, | ||
{ | ||
name: "allowJs", | ||
|
@@ -641,6 +664,7 @@ namespace ts { | |
const compilerOptions: CompilerOptions = convertCompilerOptionsFromJsonWorker(json["compilerOptions"], basePath, errors, configFileName); | ||
const options = extend(existingOptions, compilerOptions); | ||
const typingOptions: TypingOptions = convertTypingOptionsFromJsonWorker(json["typingOptions"], basePath, errors, configFileName); | ||
options.configFilePath = configFileName; | ||
|
||
const fileNames = getFileNames(errors); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1903,10 +1903,10 @@ | |
"category": "Error", | ||
"code": 2684 | ||
}, | ||
"The 'this' types of each signature are incompatible.": { | ||
"category": "Error", | ||
"code": 2685 | ||
}, | ||
"The 'this' types of each signature are incompatible.": { | ||
"category": "Error", | ||
"code": 2685 | ||
}, | ||
"Import declaration '{0}' is using private name '{1}'.": { | ||
"category": "Error", | ||
"code": 4000 | ||
|
@@ -2187,6 +2187,11 @@ | |
"category": "Error", | ||
"code": 4082 | ||
}, | ||
"Conflicting library definitions for '{0}' found at '{1}' and '{2}'. Copy the correct file to the 'typings' folder to resolve this conflict.": { | ||
"category": "Message", | ||
"code": 4090 | ||
}, | ||
|
||
"The current host does not support the '{0}' option.": { | ||
"category": "Error", | ||
"code": 5001 | ||
|
@@ -2540,7 +2545,7 @@ | |
"category": "Message", | ||
"code": 6084 | ||
}, | ||
"Enable tracing of the module resolution process.": { | ||
"Enable tracing of the name resolution process.": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"category": "Message", | ||
"code": 6085 | ||
}, | ||
|
@@ -2588,7 +2593,7 @@ | |
"category": "Message", | ||
"code": 6096 | ||
}, | ||
"File '{0}' exist - use it as a module resolution result.": { | ||
"File '{0}' exist - use it as a name resolution result.": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. file name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. answered in this comment |
||
"category": "Message", | ||
"code": 6097 | ||
}, | ||
|
@@ -2600,11 +2605,11 @@ | |
"category": "Message", | ||
"code": 6099 | ||
}, | ||
"'package.json' does not have 'typings' field.": { | ||
"'package.json' does not have 'types' field.": { | ||
"category": "Message", | ||
"code": 6100 | ||
}, | ||
"'package.json' has 'typings' field '{0}' that references '{1}'.": { | ||
"'package.json' has '{0}' field '{1}' that references '{2}'.": { | ||
"category": "Message", | ||
"code": 6101 | ||
}, | ||
|
@@ -2620,7 +2625,7 @@ | |
"category": "Message", | ||
"code": 6104 | ||
}, | ||
"Expected type of 'typings' field in 'package.json' to be 'string', got '{0}'.": { | ||
"Expected type of '{0}' field in 'package.json' to be 'string', got '{1}'.": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not generalize this to take the expected type as well? |
||
"category": "Message", | ||
"code": 6105 | ||
}, | ||
|
@@ -2662,8 +2667,60 @@ | |
}, | ||
"Raise error on 'this' expressions with an implied 'any' type.": { | ||
"category": "Message", | ||
"code": 6115 | ||
}, | ||
"code": 6115 | ||
}, | ||
"======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========": { | ||
"category": "Message", | ||
"code": 6116 | ||
}, | ||
"Resolving using primary search paths...": { | ||
"category": "Message", | ||
"code": 6117 | ||
}, | ||
"Resolving from node_modules folder...": { | ||
"category": "Message", | ||
"code": 6118 | ||
}, | ||
"======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========": { | ||
"category": "Message", | ||
"code": 6119 | ||
}, | ||
"======== Type reference directive '{0}' was not resolved. ========": { | ||
"category": "Message", | ||
"code": 6120 | ||
}, | ||
"Resolving with primary search path '{0}'": { | ||
"category": "Message", | ||
"code": 6121 | ||
}, | ||
"Root directory cannot be determined, skipping primary search paths.": { | ||
"category": "Message", | ||
"code": 6122 | ||
}, | ||
"======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========": { | ||
"category": "Message", | ||
"code": 6123 | ||
}, | ||
"Type declaration files to be included in compilation.": { | ||
"category": "Message", | ||
"code": 6124 | ||
}, | ||
"Looking up in 'node_modules' folder, initial location '{0}'": { | ||
"category": "Message", | ||
"code": 6125 | ||
}, | ||
"Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder.": { | ||
"category": "Message", | ||
"code": 6126 | ||
}, | ||
"======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========": { | ||
"category": "Message", | ||
"code": 6127 | ||
}, | ||
"======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========": { | ||
"category": "Message", | ||
"code": 6128 | ||
}, | ||
"Variable '{0}' implicitly has an '{1}' type.": { | ||
"category": "Error", | ||
"code": 7005 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this not a breaking change? Should you flag these as experimental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this flag was planned to initially appear in 2.0 which was not officially released yes so no, technically it is not a breaking change. There are few folks who might already use this flag, I'll ping them once this PR is approved. Re experimental - I don't think this is applicable here.