Skip to content

Instantly share code, notes, and snippets.

@iamandrewluca iamandrewluca/index.js
Last active Jul 26, 2019

Embed
What would you like to do?
Open DefinitelyTyped package definitions
const link = document.createElement('a');
const packageName = window.prompt('Package name');
if (packageName) {
link.href = 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/' + packageName;
} else {
link.href = 'https://github.com/DefinitelyTyped/DefinitelyTyped/';
}
link.target = '_blank';
document.body.appendChild(link);
link.click();
link.remove();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.