mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesRootDir.ts] ////
|
|
|
|
//// [value-promise.d.ts]
|
|
export type Constructor<T> = (...args: any[]) => T;
|
|
//// [bindingkey.d.ts]
|
|
import { Constructor } from "./value-promise"
|
|
export declare class BindingKey<T> {
|
|
readonly __type: T;
|
|
static create<T extends Constructor<any>>(ctor: T): BindingKey<T>;
|
|
}
|
|
|
|
//// [index.d.ts]
|
|
export * from "./src/value-promise";
|
|
export * from "./src/bindingkey";
|
|
|
|
//// [application.ts]
|
|
import { Constructor } from "@loopback/context";
|
|
export type ControllerClass = Constructor<any>;
|
|
|
|
//// [usage.ts]
|
|
import { ControllerClass } from './application';
|
|
import { BindingKey } from '@loopback/context';
|
|
|
|
export const CONTROLLER_CLASS = BindingKey.create<ControllerClass>(null as any); // line in question
|
|
|
|
|
|
//// [application.js]
|
|
export {};
|
|
//// [usage.js]
|
|
import { BindingKey } from '@loopback/context';
|
|
export const CONTROLLER_CLASS = BindingKey.create(null); // line in question
|
|
|
|
|
|
//// [application.d.ts]
|
|
import { Constructor } from "@loopback/context";
|
|
export type ControllerClass = Constructor<any>;
|
|
//// [usage.d.ts]
|
|
import { ControllerClass } from './application';
|
|
import { BindingKey } from '@loopback/context';
|
|
export declare const CONTROLLER_CLASS: BindingKey<ControllerClass>;
|