This strange piece of code is used to get a runtime array of keys that is guaranteed to be in sync with the keys of the provided interface.
export interface Db2DialectOptions { db2Module?: Db2Module;}const DIALECT_OPTION_NAMES = getSynchronizedKeys<Db2DialectOptions>({ // if a key is missing, TypeScript will throw an error db2Module: undefined,});// Output is ['db2Module']@param Copy
export interface Db2DialectOptions { db2Module?: Db2Module;}const DIALECT_OPTION_NAMES = getSynchronizedKeys<Db2DialectOptions>({ // if a key is missing, TypeScript will throw an error db2Module: undefined,});// Output is ['db2Module']@param
This strange piece of code is used to get a runtime array of keys that is guaranteed to be in sync with the keys of the provided interface.