UNPKG

413 BTypeScriptView Raw
1import { Narrowable } from './_Internal';
2/**
3 * Force `A` to comply with `W`. `A` must be a shape of `W`. In other words, `A`
4 * must extend `W` and have the same properties - no more, no less.
5 * @param A
6 * @param W
7 */
8declare type Exact<A, W> = W extends unknown ? A extends W ? A extends Narrowable ? A : {
9 [K in keyof A]: K extends keyof W ? Exact<A[K], W[K]> : never;
10} : W : never;
11export { Exact };