mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: modernize typescript api client/types imports (#23637)
This commit is contained in:
@@ -341,27 +341,3 @@ user.click(screen.getByRole("button"));
|
||||
const form = screen.getByTestId("form");
|
||||
user.click(within(form).getByRole("button"));
|
||||
```
|
||||
|
||||
❌ Does not work
|
||||
|
||||
```ts
|
||||
import { getUpdateCheck } from "api/api"
|
||||
|
||||
createMachine({ ... }, {
|
||||
services: {
|
||||
getUpdateCheck,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
✅ It works
|
||||
|
||||
```ts
|
||||
import { getUpdateCheck } from "api/api"
|
||||
|
||||
createMachine({ ... }, {
|
||||
services: {
|
||||
getUpdateCheck: () => getUpdateCheck(),
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user