Simplify test case (#20675)

This commit is contained in:
Andy
2017-12-13 11:03:37 -08:00
committed by GitHub
parent 65e92c624b
commit 6fbeced025
4 changed files with 11 additions and 97 deletions

View File

@@ -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" };