mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-31 04:33:40 +00:00
chore: update
This commit is contained in:
18
lib/test/output.test.ts
Normal file
18
lib/test/output.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { InputSpec, matchInputSpec } from "./output";
|
||||
|
||||
type TEqual<A, B> = A extends B ? (B extends A ? null : never) : never;
|
||||
function testOutput<A, B>(): (c: TEqual<A, B>) => null {
|
||||
return () => null;
|
||||
}
|
||||
const testValue = null as unknown;
|
||||
// @ts-expect-error Because enable should be a boolean
|
||||
testOutput<InputSpec["rpc"]["enable"], string>()(null);
|
||||
testOutput<InputSpec["rpc"]["enable"], boolean>()(null);
|
||||
testOutput<InputSpec["rpc"]["username"], string>()(null);
|
||||
|
||||
// testOutput<InputSpec["rpc"]["advanced"]["auth"], string[]>()(null);
|
||||
describe("Inputs", () => {
|
||||
test("test", () => {
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user