|
| 1 | +//// [tests/cases/compiler/pnpDeclarationEmitWorkspace.ts] //// |
| 2 | + |
| 3 | +=== /src/index.ts === |
| 4 | +import type { ServiceConfig, ConfigFactory } from 'package-a/other-subpath'; |
| 5 | +>ServiceConfig : Symbol(ServiceConfig, Decl(index.ts, 0, 13)) |
| 6 | +>ConfigFactory : Symbol(ConfigFactory, Decl(index.ts, 0, 28)) |
| 7 | + |
| 8 | +import { createServiceConfig } from 'package-a/other-subpath'; |
| 9 | +>createServiceConfig : Symbol(createServiceConfig, Decl(index.ts, 1, 8)) |
| 10 | + |
| 11 | +export function initializeService(url: string): ServiceConfig { |
| 12 | +>initializeService : Symbol(initializeService, Decl(index.ts, 1, 62)) |
| 13 | +>url : Symbol(url, Decl(index.ts, 3, 34)) |
| 14 | +>ServiceConfig : Symbol(ServiceConfig, Decl(index.ts, 0, 13)) |
| 15 | + |
| 16 | + return createServiceConfig(url); |
| 17 | +>createServiceConfig : Symbol(createServiceConfig, Decl(index.ts, 1, 8)) |
| 18 | +>url : Symbol(url, Decl(index.ts, 3, 34)) |
| 19 | +} |
| 20 | + |
| 21 | +export const factory = createServiceConfig; |
| 22 | +>factory : Symbol(factory, Decl(index.ts, 7, 12)) |
| 23 | +>createServiceConfig : Symbol(createServiceConfig, Decl(index.ts, 1, 8)) |
| 24 | + |
| 25 | +export interface AppConfig { |
| 26 | +>AppConfig : Symbol(AppConfig, Decl(index.ts, 7, 43)) |
| 27 | + |
| 28 | + service: ServiceConfig; |
| 29 | +>service : Symbol(AppConfig.service, Decl(index.ts, 9, 28)) |
| 30 | +>ServiceConfig : Symbol(ServiceConfig, Decl(index.ts, 0, 13)) |
| 31 | + |
| 32 | + debug: boolean; |
| 33 | +>debug : Symbol(AppConfig.debug, Decl(index.ts, 10, 25)) |
| 34 | +} |
| 35 | + |
| 36 | +=== /packages/package-a/index.d.ts === |
| 37 | +export interface BaseConfig { |
| 38 | +>BaseConfig : Symbol(BaseConfig, Decl(index.d.ts, 0, 0)) |
| 39 | + |
| 40 | + timeout: number; |
| 41 | +>timeout : Symbol(BaseConfig.timeout, Decl(index.d.ts, 0, 29)) |
| 42 | + |
| 43 | + retries: number; |
| 44 | +>retries : Symbol(BaseConfig.retries, Decl(index.d.ts, 1, 18)) |
| 45 | +} |
| 46 | + |
| 47 | +export interface DataOptions { |
| 48 | +>DataOptions : Symbol(DataOptions, Decl(index.d.ts, 3, 1)) |
| 49 | + |
| 50 | + format: "json" | "xml"; |
| 51 | +>format : Symbol(DataOptions.format, Decl(index.d.ts, 5, 30)) |
| 52 | + |
| 53 | + encoding: string; |
| 54 | +>encoding : Symbol(DataOptions.encoding, Decl(index.d.ts, 6, 25)) |
| 55 | +} |
| 56 | + |
| 57 | +export interface ServiceConfig extends BaseConfig { |
| 58 | +>ServiceConfig : Symbol(ServiceConfig, Decl(index.d.ts, 8, 1)) |
| 59 | +>BaseConfig : Symbol(BaseConfig, Decl(index.d.ts, 0, 0)) |
| 60 | + |
| 61 | + endpoint: string; |
| 62 | +>endpoint : Symbol(ServiceConfig.endpoint, Decl(index.d.ts, 10, 51)) |
| 63 | + |
| 64 | + options: DataOptions; |
| 65 | +>options : Symbol(ServiceConfig.options, Decl(index.d.ts, 11, 19)) |
| 66 | +>DataOptions : Symbol(DataOptions, Decl(index.d.ts, 3, 1)) |
| 67 | +} |
| 68 | + |
| 69 | +export type ConfigFactory = (endpoint: string) => ServiceConfig; |
| 70 | +>ConfigFactory : Symbol(ConfigFactory, Decl(index.d.ts, 13, 1)) |
| 71 | +>endpoint : Symbol(endpoint, Decl(index.d.ts, 15, 29)) |
| 72 | +>ServiceConfig : Symbol(ServiceConfig, Decl(index.d.ts, 8, 1)) |
| 73 | + |
| 74 | +export declare function createServiceConfig(endpoint: string): ServiceConfig; |
| 75 | +>createServiceConfig : Symbol(createServiceConfig, Decl(index.d.ts, 15, 64)) |
| 76 | +>endpoint : Symbol(endpoint, Decl(index.d.ts, 17, 44)) |
| 77 | +>ServiceConfig : Symbol(ServiceConfig, Decl(index.d.ts, 8, 1)) |
| 78 | + |
0 commit comments