Scripts without import/export appear to be duplicated

オープン
#104 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
compilers, tooling

調査の方向性

リンクされたPlaygroundの例で発生している重複を再現し、その後 src/components/editor/monacoTabs.tsx と src/components/editor/setupSolid.ts を調査してください。まず、rootモデルと各タブのモデルがどのように作成されるか、またTypeScriptがimportやexportのないファイルをどのように扱うかを追跡します。これらのスクリプトが重複して表示されなくなり、タブのコンパイルも壊れていなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

Playground link

image

As described by @modderme123 in https://github.com/solidjs/solid-playground/pull/103#issuecomment-1121503818:

This is an issue with files that don't have imports or exports and are then treated as a global script file. One trick might be to add a tsconfig flag to ignore output_dont_import.tsx?

I tried adding an exclude option to languages.typescript.typescriptDefaults.setCompilerOptions (in src/components/editor/setupSolid.ts) but it doesn't seem to fix the problem.

I previously wrote:

It seems that src/components/editor/monacoTabs.tsx's MonacoTabs creates two models: the model at the top of the function and the model for each tab in tabs. I'm seeing the same source code in both the root model and a tab, which is presumably the source of the problem. [...] Could we remove one of the duplicates (presumably the top-level model?)?

主要言語
TypeScript
スター
246
フォーク
71
平均マージ
5分
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

solidjs/solid-playground のほかの issue

solidjs/solid-playground の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。