mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Simplify test case (#20675)
This commit is contained in:
@@ -1,14 +1 @@
|
||||
export type BaseAttribute<T> = {
|
||||
type?: string;
|
||||
}
|
||||
export type StringAttribute = BaseAttribute<string> & {
|
||||
type: "string";
|
||||
}
|
||||
export type NumberAttribute = BaseAttribute<string> & {
|
||||
type: "number";
|
||||
}
|
||||
export type Attribute = StringAttribute | NumberAttribute;
|
||||
|
||||
const foo: Attribute = {
|
||||
type: "string"
|
||||
}
|
||||
const x: { type: string } & { type: "string" } = { type: "string" };
|
||||
|
||||
Reference in New Issue
Block a user