import type { Input } from "../Input.ts"; import { type Output, isOutput } from "../Output.ts"; import type { IsAny } from "./types.ts"; // @ts-expect-error - we want to allow any value to be checked for unknown export const isUnknown = (value: V): value is Output> => isOutput(value); export type IsUnknown = unknown extends T ? IsAny extends true ? false : true : false; export type UnknownKeys = { [K in keyof T]: IsUnknown extends true ? K : never; }[keyof T]; export type ExcludeUnknown = IsUnknown extends true ? never : T;