Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type acquisition incomplete for Material-UI #248

Closed
eps1lon opened this issue Feb 13, 2020 · 7 comments
Closed

Type acquisition incomplete for Material-UI #248

eps1lon opened this issue Feb 13, 2020 · 7 comments
Labels
Playground ATA Holes in the current type acquisition Playground Issues that affect the Playground You Can Do This A ticket which has been greenlighted as will be accepted

Comments

@eps1lon
Copy link
Contributor

eps1lon commented Feb 13, 2020

Repro: importing from @material-ui/core

The full props of the component are not available. Only key is shown in the autocomplete (which originates from the JSX typings as far as I know). Wrong types for props are not flagged as errors.

Console contains many error messages similar to

main-3.js:128 Could not get root d.ts file for the module '@material-ui/core' at ./Drawer.d.ts - will not try again in this session 404 Response.

We have a base index.d.ts that re-exports from other declarations file e.g.

export { default as Drawer } from './Drawer' where Drawer/index.d.ts contains export { default } from './Drawer.dts'.

folder structure

core/
├── index.d.ts
├── Drawer/
│   ├── index.d.ts
│   ├── Drawer.d.ts

On which branch could I work to resolve this issue i.e. is the current version still maintained or all work being done on the v2 branch?

@orta
Copy link
Contributor

orta commented Feb 13, 2020

The current version isn't really being maintained at this point, should hopefully be replaced by the end of the month - v2 version is https://github.com/microsoft/TypeScript-Website/blob/v2/packages/sandbox/src/typeAcquisition.ts which isn't well tested but at least is documented internally

@orta orta added Playground Issues that affect the Playground Playground ATA Holes in the current type acquisition You Can Do This A ticket which has been greenlighted as will be accepted labels Mar 23, 2020
@orta
Copy link
Contributor

orta commented Mar 10, 2021

Gave this a fresh look as the ATA has had a bunch of upgrades lately - this code sample still raises a lot of errors, there's a lot of files which do resolve but I think the biggest issue is we're accidentally adding a "./" to some of these paths:

Screen Shot 2021-03-10 at 10 02 24 AM

@eps1lon
Copy link
Contributor Author

eps1lon commented Mar 10, 2021

@orta Do you have automated tests for ATA that I can contribute to? From there on I might be able to work on fixes for #248 and #206. I looked at this in the past but the contribution story was less then ideal since I had to test it on the built website.

@orta
Copy link
Contributor

orta commented Mar 10, 2021

Nope, it relies on a bunch of infra provided by the site to run and hasn't really been worth the time to make a full test suite for me as it rarely changes

@eps1lon
Copy link
Contributor Author

eps1lon commented Mar 5, 2022

No longer reproduces. Probably fixed. Thanks!

@eps1lon eps1lon closed this as completed Mar 5, 2022
@orta
Copy link
Contributor

orta commented Mar 5, 2022

Yeah, ATA got a re-write with a new algorithm and that probably fixed it up

@eps1lon
Copy link
Contributor Author

eps1lon commented Mar 5, 2022

Path imports still don't work though (#206). But considering MUI works now, it might be a lot easier to get path imports to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Playground ATA Holes in the current type acquisition Playground Issues that affect the Playground You Can Do This A ticket which has been greenlighted as will be accepted
Projects
None yet
Development

No branches or pull requests

2 participants