mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
5be6aab742
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: gabritto <[email protected]> Co-authored-by: jakebailey <[email protected]>
60 lines
2.2 KiB
Plaintext
60 lines
2.2 KiB
Plaintext
monorepo/pkg3/src/keys.ts(3,14): error TS2883: The inferred type of 'ADMIN' cannot be named without a reference to 'IdType' from '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary.
|
|
|
|
|
|
==== monorepo/pkg3/tsconfig.json (0 errors) ====
|
|
{
|
|
"compilerOptions": {
|
|
"outDir": "dist",
|
|
"rootDir": "src",
|
|
"target": "es5",
|
|
"module": "commonjs",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"declaration": true
|
|
}
|
|
}
|
|
|
|
==== monorepo/pkg3/src/index.ts (0 errors) ====
|
|
export * from './keys';
|
|
==== monorepo/pkg3/src/keys.ts (1 errors) ====
|
|
import {MetadataAccessor} from "@raymondfeng/pkg2";
|
|
|
|
export const ADMIN = MetadataAccessor.create<boolean>('1');
|
|
~~~~~
|
|
!!! error TS2883: The inferred type of 'ADMIN' cannot be named without a reference to 'IdType' from '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary.
|
|
==== monorepo/pkg1/dist/index.d.ts (0 errors) ====
|
|
export * from './types';
|
|
==== monorepo/pkg1/dist/types.d.ts (0 errors) ====
|
|
export declare type A = {
|
|
id: string;
|
|
};
|
|
export declare type B = {
|
|
id: number;
|
|
};
|
|
export declare type IdType = A | B;
|
|
export declare class MetadataAccessor<T, D extends IdType = IdType> {
|
|
readonly key: string;
|
|
private constructor();
|
|
toString(): string;
|
|
static create<T, D extends IdType = IdType>(key: string): MetadataAccessor<T, D>;
|
|
}
|
|
==== monorepo/pkg1/package.json (0 errors) ====
|
|
{
|
|
"name": "@raymondfeng/pkg1",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "dist/index.js",
|
|
"typings": "dist/index.d.ts"
|
|
}
|
|
==== monorepo/pkg2/dist/index.d.ts (0 errors) ====
|
|
export * from './types';
|
|
==== monorepo/pkg2/dist/types.d.ts (0 errors) ====
|
|
export {MetadataAccessor} from '@raymondfeng/pkg1';
|
|
==== monorepo/pkg2/package.json (0 errors) ====
|
|
{
|
|
"name": "@raymondfeng/pkg2",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"main": "dist/index.js",
|
|
"typings": "dist/index.d.ts"
|
|
} |