mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
25 lines
662 B
TypeScript
25 lines
662 B
TypeScript
// @declaration: true
|
|
// @strict: true
|
|
// @lib: es2015
|
|
|
|
// @filename: node_modules/lib/index.d.ts
|
|
export declare const MySymbol: unique symbol;
|
|
export declare function createService<T>(): {
|
|
new (): {
|
|
[MySymbol](): T | undefined;
|
|
};
|
|
};
|
|
|
|
// @filename: client.ts
|
|
// @ts-ignore Import needed for type visibility but appears unused
|
|
import { MySymbol } from "lib";
|
|
import { createService } from "lib";
|
|
|
|
// The extends clause references the factory result which uses MySymbol
|
|
// This should trigger symbol accessibility check for MySymbol
|
|
export class Client extends createService<string>() {
|
|
doSomething(): string {
|
|
return "hello";
|
|
}
|
|
}
|