* move test_helpers to the core * create base tsconfig * all tsconfigs use the base one * use test_helpers exposed from the src/core * move getFieldFormatsRegistry to data plugin * add test_utils project * compile types after checkout * add a stub for platform tsconfig.json * fix broken import * fix broken path to the base config * set tsBuildInfoFile for project without outDir * do not commit tsbuildinfo file * do not check output d.ts files * fix type error * use separate config to build types * rollback changes to include paths * mute import zone error * rename files to avoid references to tsd * do not use tsd for type tests * include all ts files in project * run buildRefs before type check to ensure the latest version * store tsbuildinfo locally * update paths to base config * comment out core/tsconfig.json * remove ui path * fix wrong tsbuildinfo path
15 lines
457 B
TypeScript
15 lines
457 B
TypeScript
/*
|
|
* Elasticsearch B.V licenses this file to you under the MIT License.
|
|
* See `packages/elastic-safer-lodash-set/LICENSE` for more information.
|
|
*/
|
|
|
|
import { expectType } from 'tsd';
|
|
import set from '../set';
|
|
|
|
const someObj: object = {};
|
|
const anyValue: any = 'any value';
|
|
|
|
expectType<object>(set(someObj, 'a.b.c', anyValue));
|
|
expectType<object>(set(someObj, ['a.b.c'], anyValue));
|
|
expectType<object>(set(someObj, ['a.b.c', 2, Symbol('hep')], anyValue));
|