Skip to content

Question about multiple editors. #101

Answered by mkslanc
Jxhnn asked this question in Q&A
Feb 13, 2024 · 1 comments · 15 replies
Discussion options

You must be logged in to vote

@Jxhnn, thank you for your interest in this project! Due to limitations in the browser environment, achieving a fully functional experience, especially with the file system, is somewhat challenging. However, there is a workaround for the TypeScript service: you can set your files to the extraLibs property in globalOptions, similar to this:

languageProvider.setGlobalOptions("typescript", {
    extraLibs: {
        "dir/someFile.ts": {
            content: "export var someVar = 123",
            version: 1
        }
    }
});

import in that case could be:

import * as someFile from "./dir/someFile";

someFile.someVar

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@josheyr
Comment options

@mkslanc
Comment options

@josheyr
Comment options

@mkslanc
Comment options

@josheyr
Comment options

Answer selected by mkslanc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #100 on February 16, 2024 10:49.