Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
molszanski committed Nov 17, 2024
1 parent 08f6596 commit 99b97f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion iti/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"test": "yarn jest && yarn tsd",
"jestWatch": "jest --watch --verbose",
"tsd": "tsd tsd_project",
"v": "vitest"
"v": "vitest",
"vitest:types": "vitest --typecheck"
},
"dependencies": {
"utility-types": "^3.10.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { describe, it, expect, vi, beforeEach } from "vitest"
import { getMainMockAppContainer } from "./mocks/_mock-app-container"
import { expectType, expectError, printType, expectNotType } from "tsd"
import { A_Container } from "./mocks/container.a"
import { B_Container } from "./mocks/container.b"
import { C_Container } from "./mocks/container.c"
import type { A_Container } from "./mocks/container.a"
import type { B_Container } from "./mocks/container.b"
import type { C_Container } from "./mocks/container.c"

it("should check token types", () => {
const cont = getMainMockAppContainer()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, it, expect, vi, beforeEach } from "vitest"
import { expectType, expectNotType } from "tsd"

import { createContainer } from "../src/iti"
Expand All @@ -9,7 +10,7 @@ enum UniqueResult {
D,
}
// results produced by an add should valid
;(async () => {
it("should check getter types", () => {
const node = createContainer()
.add({
a: UniqueResult.A,
Expand All @@ -24,4 +25,4 @@ enum UniqueResult {
expectType<UniqueResult.C>(node.get("c"))

expectNotType<any>(node)
})()
})

0 comments on commit 99b97f0

Please sign in to comment.