mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Effort to deduplicate code. Move nested property utilities and url state to packages. Boilerplate for the packages was created likes this: ``` node scripts/generate package @kbn/ml-url-state --web --dir ./x-pack/packages/ml/url_state node scripts/generate package @kbn/ml-nested-property --web --dir ./x-pack/packages/ml/nested_property ``` I consolidated the different `url_state.ts` files. One thing to note: Each one had its own definition for `pageKey: AppStateKey`. I changed that and made it just `pageKey: string`, I suspect it's good enough. Otherwise we'd have a reverse dependency on all consuming code. Alternative: We could refactor to require overriding a generic to pass in allowed values.
9 lines
380 B
TypeScript
9 lines
380 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
* 2.0.
|
|
*/
|
|
|
|
export { getNestedProperty } from './src/get_nested_property';
|
|
export { setNestedProperty } from './src/set_nested_property';
|