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 #2101 support externalSymbolLinkMappings wildcard #2102

Merged
merged 1 commit into from
Nov 13, 2022
Merged

Fix #2101 support externalSymbolLinkMappings wildcard #2102

merged 1 commit into from
Nov 13, 2022

Conversation

mistic100
Copy link
Contributor

This solves #2101 with the syntax suggested in said issue.

{
    "externalSymbolLinkMappings": {
        "external-lib": {
            "SomeObject": "https://external-lib.site/docs/SomeObject",
            "*": "https://external-lib.site/docs"
        }
    }
}

@mistic100
Copy link
Contributor Author

mistic100 commented Nov 12, 2022

A question I have is should we bring this further ? Like regex match ? or URL templating ?

{
  "*": "https://external-lib.site/docs/${name}"
}

I feel it will never cover all possible cases (In my case three.js documentation URL is categorized so only an full explicit configuration can work if I want complete links). So perhaps just keep it simple.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 13, 2022

I think simple is good, at least initially. Maybe glob matching in the future, but I don't really see a use case for it that wouldn't be better served by writing a plugin. This option is really meant for one offs, for bigger things (linking to MDN, Node docs) a plugin is much more scalable.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 13, 2022

This is perfect, thank you!

@Gerrit0 Gerrit0 merged commit 0ba5af5 into TypeStrong:master Nov 13, 2022
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.

2 participants