Collection of utility types
# npm
npm install --save-dev @chore-dev/utility-types
# yarn
yarn add -D @chore-dev/utility-types
# pnpm
pnpm add -D @chore-dev/utility-types
Using DeepGetType
as an example:
import {DeepGetType} from '@chore-dev/utility-types';
type DeepObject = {
a: {
b: {
c: {
d: string;
};
};
};
};
type DeepType = DeepGetType<DeepObject, 'a.b.c.d'>; // string
See documentation for more details.