mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
697 B
TypeScript
28 lines
697 B
TypeScript
//// [tests/cases/compiler/errorsWithInvokablesInUnions01.ts] ////
|
|
|
|
//// [errorsWithInvokablesInUnions01.ts]
|
|
interface ConstructableA {
|
|
new(): { somePropA: any };
|
|
}
|
|
|
|
interface IDirectiveLinkFn<TScope> {
|
|
(scope: TScope): void;
|
|
}
|
|
|
|
interface IDirectivePrePost<TScope> {
|
|
pre?: IDirectiveLinkFn<TScope>;
|
|
post?: IDirectiveLinkFn<TScope>;
|
|
}
|
|
|
|
export let blah: IDirectiveLinkFn<number> | ConstructableA | IDirectivePrePost<number> = (x: string) => {}
|
|
|
|
export let ctor: IDirectiveLinkFn<number> | ConstructableA | IDirectivePrePost<number> = class {
|
|
someUnaccountedProp: any;
|
|
}
|
|
|
|
|
|
//// [errorsWithInvokablesInUnions01.js]
|
|
export let blah = (x) => { };
|
|
export let ctor = class {
|
|
};
|