mui / toolpad

Toolpad: Full stack components and low-code builder for dashboards and internal apps.
https://mui.com/toolpad/
MIT License
964 stars 243 forks source link

Provide types for the function runtime #1324

Closed Janpot closed 1 year ago

Janpot commented 1 year ago

Steps to reproduce 🕹

  1. Create a function query
  2. observe the type errors:

    Screenshot 2022-11-10 at 11 36 40

Introduced in https://github.com/mui/mui-toolpad/pull/1180 where we removed the DOM lib by default from the TypeScript editor. This is a good thing, because the DOM lib included way more types than the function runtime supports. We'll just have to build a custom .d.ts file for the function runtime that only includes what it supports. for now:

Any way we can automate this? Can we do something with https://github.com/microsoft/TypeScript-DOM-lib-generator to generate a subset?

prakhargupta1 commented 1 year ago

Closing as discussed with Jan