mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 02:21:30 -05:00
Merge pull request #6846 from Microsoft/noErrorOnEmptyDtsFile
do not error if typings for external library is empty .d.ts file
This commit is contained in:
13
tests/baselines/reference/noErrorOnEmptyDts.js
Normal file
13
tests/baselines/reference/noErrorOnEmptyDts.js
Normal file
@@ -0,0 +1,13 @@
|
||||
//// [tests/cases/compiler/noErrorOnEmptyDts.ts] ////
|
||||
|
||||
//// [test.d.ts]
|
||||
|
||||
|
||||
// comment
|
||||
|
||||
//// [main.ts]
|
||||
import "test"
|
||||
|
||||
//// [main.js]
|
||||
"use strict";
|
||||
require("test");
|
||||
8
tests/baselines/reference/noErrorOnEmptyDts.symbols
Normal file
8
tests/baselines/reference/noErrorOnEmptyDts.symbols
Normal file
@@ -0,0 +1,8 @@
|
||||
=== c:/node_modules/test.d.ts ===
|
||||
|
||||
No type information for this code.
|
||||
No type information for this code.// comment
|
||||
No type information for this code.
|
||||
No type information for this code.=== c:/app/main.ts ===
|
||||
import "test"
|
||||
No type information for this code.
|
||||
8
tests/baselines/reference/noErrorOnEmptyDts.types
Normal file
8
tests/baselines/reference/noErrorOnEmptyDts.types
Normal file
@@ -0,0 +1,8 @@
|
||||
=== c:/node_modules/test.d.ts ===
|
||||
|
||||
No type information for this code.
|
||||
No type information for this code.// comment
|
||||
No type information for this code.
|
||||
No type information for this code.=== c:/app/main.ts ===
|
||||
import "test"
|
||||
No type information for this code.
|
||||
8
tests/cases/compiler/noErrorOnEmptyDts.ts
Normal file
8
tests/cases/compiler/noErrorOnEmptyDts.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module: commonjs
|
||||
|
||||
// @filename: c:/node_modules/test.d.ts
|
||||
|
||||
// comment
|
||||
|
||||
// @filename: c:/app/main.ts
|
||||
import "test"
|
||||
Reference in New Issue
Block a user