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

Add string.prototype.replaceall typing #7

Merged
merged 1 commit into from May 10, 2021
Merged

Add string.prototype.replaceall typing #7

merged 1 commit into from May 10, 2021

Conversation

twokul
Copy link
Contributor

@twokul twokul commented May 10, 2021

No description provided.

@twokul twokul requested a review from bantic May 10, 2021 17:57
"rootDir": ".."
"rootDir": "..",
"paths": {
"string.prototype.replaceall": ["../types/string.prototype.replaceall"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will instruct TypeScript server to look up string.prototype.replaceall in ../types/string.prototype.replaceall.

We could add "*": ["../types/*"] which is okay, IMO. I decided to make the minimal change though.

Weirdly enough, typeRoots option does not work for including custom types as per microsoft/TypeScript#22217 (albeit, it is an old issue, the last comments are still relevant.)

tsconfig#paths

Copy link
Member

@bantic bantic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm — thanks for fixing this!

@bantic bantic merged commit 98eca93 into master May 10, 2021
@bantic bantic deleted the twokul/typing branch May 10, 2021 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants