* feat(26217): Add missing function declaration QF * use codeFixAvailable instead of codeFix * add diagnostics messages 'Method not implemented.' and 'Function not implemented.' * use codeFixAvailable instead of codeFix * fix signature types
50 lines
894 B
TypeScript
50 lines
894 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @filename: /test.ts
|
|
////export const x = 1;
|
|
|
|
// @filename: /foo.ts
|
|
////import * as test from "./test";
|
|
////
|
|
////namespace Foo {
|
|
//// export const x = 0;
|
|
////}
|
|
////
|
|
////test.f();
|
|
////Foo.f();
|
|
////f();
|
|
|
|
goTo.file("/foo.ts");
|
|
verify.codeFixAll({
|
|
fixId: "fixMissingFunctionDeclaration",
|
|
fixAllDescription: ts.Diagnostics.Add_all_missing_function_declarations.message,
|
|
newFileContent: {
|
|
"/test.ts":
|
|
`export const x = 1;
|
|
|
|
export function f() {
|
|
throw new Error("Function not implemented.");
|
|
}
|
|
`,
|
|
"/foo.ts":
|
|
`import * as test from "./test";
|
|
|
|
namespace Foo {
|
|
export const x = 0;
|
|
|
|
export function f() {
|
|
throw new Error("Function not implemented.");
|
|
}
|
|
}
|
|
|
|
test.f();
|
|
Foo.f();
|
|
f();
|
|
|
|
function f() {
|
|
throw new Error("Function not implemented.");
|
|
}
|
|
`
|
|
}
|
|
});
|