Accept change in existing baseline

This commit is contained in:
Sheetal Nandi 2019-09-25 09:07:51 -07:00
parent 041b16c0a3
commit 3d6a182857
2 changed files with 3 additions and 60 deletions

View file

@ -1,60 +0,0 @@
tests/cases/compiler/monorepo/pkg3/src/keys.ts(3,14): error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary.
==== tests/cases/compiler/monorepo/pkg3/tsconfig.json (0 errors) ====
{
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"target": "es5",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"declaration": true
}
}
==== tests/cases/compiler/monorepo/pkg1/dist/index.d.ts (0 errors) ====
export * from './types';
==== tests/cases/compiler/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>;
}
==== tests/cases/compiler/monorepo/pkg1/package.json (0 errors) ====
{
"name": "@raymondfeng/pkg1",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"typings": "dist/index.d.ts"
}
==== tests/cases/compiler/monorepo/pkg2/dist/index.d.ts (0 errors) ====
export * from './types';
==== tests/cases/compiler/monorepo/pkg2/dist/types.d.ts (0 errors) ====
export {MetadataAccessor} from '@raymondfeng/pkg1';
==== tests/cases/compiler/monorepo/pkg2/package.json (0 errors) ====
{
"name": "@raymondfeng/pkg2",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"typings": "dist/index.d.ts"
}
==== tests/cases/compiler/monorepo/pkg3/src/index.ts (0 errors) ====
export * from './keys';
==== tests/cases/compiler/monorepo/pkg3/src/keys.ts (1 errors) ====
import {MetadataAccessor} from "@raymondfeng/pkg2";
export const ADMIN = MetadataAccessor.create<boolean>('1');
~~~~~
!!! error TS2742: The inferred type of 'ADMIN' cannot be named without a reference to '../../pkg2/node_modules/@raymondfeng/pkg1/dist'. This is likely not portable. A type annotation is necessary.

View file

@ -57,5 +57,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./keys"));
//// [keys.d.ts]
import { MetadataAccessor } from "@raymondfeng/pkg2";
export declare const ADMIN: MetadataAccessor<boolean, import("../../pkg1/dist").IdType>;
//// [index.d.ts]
export * from './keys';