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

fix(ui5-tooling-transpile): add support for d.ts source maps #735

Merged
merged 1 commit into from
Apr 22, 2023

Conversation

petermuessig
Copy link
Member

@petermuessig petermuessig commented Apr 22, 2023

Adding d.ts.map support to allow to "Go to Sources Definition" in VSCode. We need to post-process the d.ts.map to correct the source mapping to the sources of the project. Due to the virtual paths, this doesn't work automatically.

With this fix, we are in general switching back to using types in the tsconfig.json. The typeRoots seem to work semi-optimal in case of using dependencies as the typeRoots are scanning the given folder and its subfolders for index.d.ts files. Using types the NPM package needs to provide the types mapping to the index.d.ts file in the package.json but in general we do not run into the TS2688 issue when running type checking. With the solution using types all scenarios are working fine now. Once a custom type is being added it requires to list the openui5 and the custom types of the library next to it.

@petermuessig petermuessig merged commit cafc5b9 into main Apr 22, 2023
@petermuessig petermuessig deleted the fix/dtsSourceMaps branch April 22, 2023 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant