mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
allow other files except .d.ts as external library packages
This commit is contained in:
parent
fb09401ef7
commit
5162edbdc2
@ -1712,10 +1712,6 @@
|
||||
"category": "Error",
|
||||
"code": 2654
|
||||
},
|
||||
"Exported external package typings can only be in '.d.ts' files. Please contact the package author to update the package definition.": {
|
||||
"category": "Error",
|
||||
"code": 2655
|
||||
},
|
||||
"Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.": {
|
||||
"category": "Error",
|
||||
"code": 2656
|
||||
|
||||
@ -863,10 +863,6 @@ namespace ts {
|
||||
let start = getTokenPosOfNode(file.imports[i], file);
|
||||
fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition, importedFile.fileName));
|
||||
}
|
||||
else if (!fileExtensionIs(importedFile.fileName, ".d.ts")) {
|
||||
let start = getTokenPosOfNode(file.imports[i], file);
|
||||
fileProcessingDiagnostics.add(createFileDiagnostic(file, start, file.imports[i].end - start, Diagnostics.Exported_external_package_typings_can_only_be_in_d_ts_files_Please_contact_the_package_author_to_update_the_package_definition));
|
||||
}
|
||||
else if (importedFile.referencedFiles.length) {
|
||||
let firstRef = importedFile.referencedFiles[0];
|
||||
fileProcessingDiagnostics.add(createFileDiagnostic(importedFile, firstRef.pos, firstRef.end - firstRef.pos, Diagnostics.Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user