* Add test with bug * Fix for import placement * Consolidate comment recognition functions into utilities * Add another test with all 3 kinds * Recognize path directives as part of triple slash directives * Also handle no-default-lib triple-slash comments * Test for all the triple-slash kinds * Keep import-placement logic in the quickfix, since its not really a node start; accept new baselines * Work in not-ES6, use a real no-lib comment * Remove no default lib triple slash comment, it disables checking and thereby quick fixes * Copy regex rather than have a regex copy
24 lines
471 B
TypeScript
24 lines
471 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
//// [|/**
|
|
//// * This is a comment intended to be attached to this interface
|
|
//// */
|
|
//// export interface SomeInterface {
|
|
//// }
|
|
//// f1/*0*/();|]
|
|
|
|
// @Filename: module.ts
|
|
//// export function f1() {}
|
|
//// export var v1 = 5;
|
|
|
|
verify.importFixAtPosition([
|
|
`import { f1 } from "./module";
|
|
|
|
/**
|
|
* This is a comment intended to be attached to this interface
|
|
*/
|
|
export interface SomeInterface {
|
|
}
|
|
f1();`
|
|
]);
|