kibana/packages/kbn-safer-lodash-set/test/set.ts
Spencer 9003353729
rename @elastic/* packages to @kbn/* (#138957)
* rename @elastic/* packages to @kbn/*

* update yarn.lock

* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'

* update lint task

* review feedback

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-18 08:54:42 -07:00

14 lines
453 B
TypeScript

/*
* Elasticsearch B.V licenses this file to you under the MIT License.
* See `packages/kbn-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));