Remove expressions.legacy from README (#79681)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Corey Robertson 2020-11-24 12:42:46 -05:00 committed by GitHub
parent 38a09b99c4
commit 9055574fa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,7 @@ yarn start
#### Adding a server-side function
> Server side functions may be deprecated in a later version of Kibana as they require using an API marked _legacy_
> Server side functions may be deprecated in a later version of Kibana
Now, let's add a function which runs on the server.
@ -206,9 +206,7 @@ And then in our setup method, register it with the Expressions plugin:
```typescript
setup(core: CoreSetup, plugins: CanvasExamplePluginsSetup) {
// .register requires serverFunctions and types, so pass an empty array
// if you don't have any custom types to register
plugins.expressions.__LEGACY.register({ serverFunctions, types: [] });
serverFunctions.forEach((f) => plugins.expressions.registerFunction(f));
}
```