diff --git a/js/optionize.ts b/js/optionize.ts index afbda7b..84b7513 100644 --- a/js/optionize.ts +++ b/js/optionize.ts @@ -18,19 +18,12 @@ import phetCore from './phetCore.js'; import merge from './merge.js'; import IntentionalAny from './types/IntentionalAny.js'; - -// https://github.com/piotrwitek/utility-types/blob/master/src/mapped-types.ts -type OptionalKeys = { - [K in keyof T]-?: object extends Pick ? K : never; -}[keyof T]; +import RequiredKeys from './types/RequiredKeys.js'; +import OptionalKeys from './types/OptionalKeys.js'; // Gets the parts of an object that are optional type Options = Pick>; -export type RequiredKeys = { - [K in keyof T]-?: object extends Pick ? never : K; -}[keyof T]; - type ObjectWithNoKeys = Record; export type EmptySelfOptions = {