Skip to content

Add UI for setting the lib option in playground #136

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

Closed
Gerrit0 opened this issue Nov 25, 2019 · 6 comments
Closed

Add UI for setting the lib option in playground #136

Gerrit0 opened this issue Nov 25, 2019 · 6 comments
Labels
Playground Issues that affect the Playground

Comments

@Gerrit0
Copy link
Contributor

Gerrit0 commented Nov 25, 2019

You can set the --lib option in the playground by adding a URL parameter with the file you want to load - http://www.typescriptlang.org/play/index.html?lib=lib.esnext.d.ts, well, kind of. It doesn't load any referenced lib files, so you have to manually add those you need.

This doesn't seem to be documented anywhere. It would be great to be able to load lib files with a UI and have them properly load dependencies too.

@orta orta transferred this issue from microsoft/TypeScript-Handbook Nov 26, 2019
@orta
Copy link
Contributor

orta commented Nov 26, 2019

Yeah, agree - kinda blocked on orta/make-monaco-builds#2 in order to have a set of them all per TS version

@orta
Copy link
Contributor

orta commented Dec 26, 2019

This is now unblocked by orta/make-monaco-builds#3

@orta
Copy link
Contributor

orta commented Jan 12, 2022

This became feasible via // @lib: dom, es2015 - I don't think we'll ever expose the lib options in the UI

@WORMSS
Copy link

WORMSS commented Mar 8, 2023

Can I put a plus one in for this..

I kinda wanna target a lower version, but add the es2019 lib so I can see what the polyfill output of certain lines of code would be.

@typescript-bot
Copy link
Collaborator

Hello! As per #2804, we are automatically closing all open issues. Please see #2804 for a description of what issues and PRs can be accepted going forward.

@typescript-bot typescript-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2023
@KristjanTammekivi
Copy link

This became feasible via // @lib: dom, es2015 - I don't think we'll ever expose the lib options in the UI

Currently putting a space before es2015 results in only dom being used, but // @lib: dom,es2015 works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Playground Issues that affect the Playground
Projects
None yet
Development

No branches or pull requests

5 participants