2016-11-17 01:01:16 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
//// let a = "I am a non-trivial statement that appears before imports";
|
|
|
|
//// import d from "other-ambient-module"
|
2020-07-09 00:25:04 +02:00
|
|
|
//// import * as ns from "yet-another-ambient-module"
|
|
|
|
//// var x = v1/*0*/ + 5;
|
2016-11-17 01:01:16 +01:00
|
|
|
|
|
|
|
// @Filename: ambientModule.ts
|
|
|
|
//// declare module "ambient-module" {
|
|
|
|
//// export function f1();
|
|
|
|
//// export var v1;
|
|
|
|
//// }
|
|
|
|
|
|
|
|
// @Filename: otherAmbientModule.ts
|
|
|
|
//// declare module "other-ambient-module" {
|
|
|
|
//// export default function f2();
|
|
|
|
//// }
|
|
|
|
|
|
|
|
// @Filename: yetAnotherAmbientModule.ts
|
|
|
|
//// declare module "yet-another-ambient-module" {
|
|
|
|
//// export function f3();
|
|
|
|
//// export var v3;
|
|
|
|
//// }
|
|
|
|
|
|
|
|
// test cases when there are no semicolons at the line end
|
|
|
|
verify.importFixAtPosition([
|
2020-07-09 00:25:04 +02:00
|
|
|
`let a = "I am a non-trivial statement that appears before imports";
|
2016-11-17 01:01:16 +01:00
|
|
|
import { v1 } from "ambient-module";
|
2020-07-09 00:25:04 +02:00
|
|
|
import d from "other-ambient-module"
|
|
|
|
import * as ns from "yet-another-ambient-module"
|
2016-11-17 01:01:16 +01:00
|
|
|
var x = v1 + 5;`
|
2017-05-01 20:42:22 +02:00
|
|
|
]);
|