mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
12 lines
237 B
TypeScript
12 lines
237 B
TypeScript
import { typeFromProps } from "../../util";
|
|
|
|
export class IBuilder<A> {
|
|
protected constructor(readonly a: A) { }
|
|
|
|
public build(): A {
|
|
return this.a;
|
|
}
|
|
}
|
|
|
|
export type BuilderExtract<A> = A extends IBuilder<infer B> ? B : never;
|