12 lines
371 B
TypeScript
12 lines
371 B
TypeScript
import { Result } from "../result";
|
|
import { Type } from "../type";
|
|
export type Constructor<T> = Function & {
|
|
prototype: T;
|
|
};
|
|
export declare class InstanceOf<T> extends Type<T> {
|
|
readonly klass: Constructor<T>;
|
|
constructor(klass: Constructor<T>);
|
|
check(val: any): Result<T>;
|
|
}
|
|
export declare function instanceOf<T>(klass: Constructor<T>): InstanceOf<T>;
|