kibana/x-pack/packages/ml/nested_property/index.ts
Walter Rafelsberger 8a44ba3158
[ML] Move nested property utilities and url state to packages (#147912)
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.
2022-12-27 15:59:14 +01:00

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';