Skip to content

Commit cbaf16a

Browse files
committed
update
1 parent 90087e0 commit cbaf16a

File tree

5 files changed

+245
-194
lines changed

5 files changed

+245
-194
lines changed
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, test } from "vitest";
22
import type { Equal, Expect } from "@type-challenges/utils";
3-
import { type ComputedState, configurable, s, type SchemaDescriptorBuilder } from "../../src";
3+
import { type ComputedState, configurable, s } from "../../src";
44

55
describe("ComputedState", () => {
66
test("Schmea计算状态", () => {
@@ -14,11 +14,8 @@ describe("ComputedState", () => {
1414
}),
1515
},
1616
};
17-
type RawType = typeof state;
18-
type PriceType = RawType["order"]["price"];
19-
type CountType = RawType["order"]["count"];
20-
type isSchemaType = PriceType extends (...args: any[]) => any ? true : false;
21-
type isSchemasType = PriceType extends SchemaDescriptorBuilder<infer X, any> ? X : false;
22-
type dstate = ComputedState<RawType>;
17+
type CState = ComputedState<typeof state>;
18+
19+
type Cases = [Expect<Equal<CState["order"]["price"], number>>, Expect<Equal<CState["order"]["count"], number>>];
2320
});
2421
});

0 commit comments

Comments
 (0)