mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
672 B
TypeScript
24 lines
672 B
TypeScript
//// [tests/cases/compiler/funduleUsedAcrossFileBoundary.ts] ////
|
|
|
|
//// [funduleUsedAcrossFileBoundary_file1.ts]
|
|
declare function Q<T>(value: T): string;
|
|
declare namespace Q {
|
|
interface Promise<T> {
|
|
foo: string;
|
|
}
|
|
export function defer<T>(): string;
|
|
}
|
|
|
|
//// [funduleUsedAcrossFileBoundary_file2.ts]
|
|
function promiseWithCancellation<T>(promise: Q.Promise<T>) {
|
|
var deferred = Q.defer<T>(); // used to be an error
|
|
}
|
|
|
|
//// [funduleUsedAcrossFileBoundary_file1.js]
|
|
"use strict";
|
|
//// [funduleUsedAcrossFileBoundary_file2.js]
|
|
"use strict";
|
|
function promiseWithCancellation(promise) {
|
|
var deferred = Q.defer(); // used to be an error
|
|
}
|