build: Properly add typecheck tests (#10722)

* build: exclude type tests from running

* refactor: use `tsc`

* test: fix broker test

* test: fix voice test

* test: fix builders test

* test: use vitest typecheck

remove unused test scripts
skip lib check
rm vitest.d.ts

* fix: remove tsd from core and ws

* fix: extend local tsconfig

---------

Co-authored-by: almeidx <github@almeidx.dev>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Jiralite
2025-01-26 14:28:45 +00:00
committed by GitHub
parent b820daadd4
commit 9b8b0f828c
44 changed files with 443 additions and 479 deletions

View File

@@ -1,9 +1,9 @@
import { expectType } from 'tsd';
import { expectTypeOf } from 'vitest';
import { isEquatable, type Equatable } from '../../src/index.js';
declare const unknownObj: unknown;
if (isEquatable(unknownObj)) {
expectType<Equatable<unknown>>(unknownObj);
expectType<boolean>(unknownObj.equals(unknownObj));
expectTypeOf(unknownObj).toEqualTypeOf<Equatable<unknown>>();
expectTypeOf(unknownObj.equals(unknownObj)).toEqualTypeOf<boolean>();
}

View File

@@ -1,9 +1,9 @@
import { expectType } from 'tsd';
import { expectTypeOf } from 'vitest';
import { isJSONEncodable, type JSONEncodable } from '../../src/index.js';
declare const unknownObj: unknown;
if (isJSONEncodable(unknownObj)) {
expectType<JSONEncodable<unknown>>(unknownObj);
expectType<unknown>(unknownObj.toJSON());
expectTypeOf(unknownObj).toEqualTypeOf<JSONEncodable<unknown>>();
expectTypeOf(unknownObj.toJSON()).toEqualTypeOf<unknown>();
}