Skip to content

Commit d5a4498

Browse files
author
Corey Robertson
authored
Remove expressions.legacy from README
1 parent 4d58a00 commit d5a4498

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

x-pack/plugins/canvas/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ yarn start
149149

150150
#### Adding a server-side function
151151

152-
> Server side functions may be deprecated in a later version of Kibana as they require using an API marked _legacy_
152+
> Server side functions may be deprecated in a later version of Kibana
153153
154154
Now, let's add a function which runs on the server.
155155

@@ -206,9 +206,7 @@ And then in our setup method, register it with the Expressions plugin:
206206

207207
```typescript
208208
setup(core: CoreSetup, plugins: CanvasExamplePluginsSetup) {
209-
// .register requires serverFunctions and types, so pass an empty array
210-
// if you don't have any custom types to register
211-
plugins.expressions.__LEGACY.register({ serverFunctions, types: [] });
209+
serverFunctions.forEach((f) => plugins.expressions.registerFunction(f));
212210
}
213211
```
214212

0 commit comments

Comments
 (0)