mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
avoid add missing member in declaration file
This commit is contained in:
1 parent
3a2f6a3ed1
commit
bf42f5bd1c
3 files changed
+37
-2
No files matched your search
@@ -0,0 +1,17 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: ./declarations.d.ts
|
||||
//// interface Response {}
|
||||
|
||||
// @Filename: foo.ts
|
||||
//// import './declarations.d.ts'
|
||||
//// declare const resp: Response
|
||||
//// resp.test()
|
||||
|
||||
goTo.file('foo.ts')
|
||||
|
||||
verify.codeFixAvailable([
|
||||
{ description: "Declare method 'test'" },
|
||||
{ description: "Declare property 'test'" },
|
||||
{ description: "Add index signature for property 'test'" }
|
||||
])
|
||||
@@ -0,0 +1,13 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @Filename: /node_modules/foo/declarations.d.ts
|
||||
//// interface Response {}
|
||||
|
||||
// @Filename: foo.ts
|
||||
//// import '/node_modules/foo/declarations.d.ts'
|
||||
//// declare const resp: Response
|
||||
//// resp.test()
|
||||
|
||||
goTo.file('foo.ts')
|
||||
|
||||
verify.not.codeFixAvailable()
|
||||
Reference in new issue
Block a user