You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Syntactic and other basic TypeScript errors are now shown with red underlines and a tooltip on hover.
We currently can't show any errors that depend on typings, because we don't fetch them (even the standard libs)! This will require some more work -- tracking separately at #119 and will send as followup.
It's using the Language Server Protocol Diagnostic type as the interface. Should be good for other diagnostic sources we might add in the future.
Sadly, we're currently displaying a border-bottom: 2px dashed red, instead of text-decoration: red wavy underline, because wavy doesn't render anything for single characters (!): https://bugs.chromium.org/p/chromium/issues/detail?id=668042). Could add a custom implementation of wavy underlines as a followup.
|`projectSrc`|`string`|`undefined`| URL of a [project files manifest](#option-2-json-manifest) to load. |
539
+
|`files`|`SampleFile[]`|`undefined`| Get or set the array of project files ([details](#option-3-files-property)). |
540
+
|`sandboxScope`|`string`|`"playground-elements"`| The service worker scope to register on. |
541
+
|`sandboxBaseUrl`|`string`|_module parent directory_| Base URL for script execution sandbox ([details](#sandbox)). |
542
+
|`diagnostics`|`Map<string, lsp.Diagnostic>`|`undefined`| Map from filename to array of Language Server Protocol diagnostics resulting from the latest compilation. | ` |
542
543
543
544
### Methods
544
545
@@ -657,6 +658,7 @@ to quickly experiment with themes and other customizations.
657
658
|`--playground-code-TOKEN-color`|*various*| Color of each kind of `TOKEN` in syntax highlighted-code. See the [syntax highlighting](#syntax-highlighting) section for details. |
658
659
|`--playground-highlight-color`|`#6200EE`| Color of the active file-picker tab label and indicator, and the preview loading bar |
659
660
|`--playground-code-background`|`#FFFFFF`|`background` of the code editor |
661
+
|`--playground-error-border`|`2px red dashed`|`border-bottom` of code spans with an error |
660
662
|`--playground-tab-bar-background`|`#EAEAEA`|`background` of the editor file-picker tab bar |
661
663
|`--playground-tab-bar-foreground-color`|`#000000`| Text `color` of inactive file-picker tabs |
662
664
|`--playground-preview-toolbar-background`|`#FFFFFF`|`background` of the preview toolbar |
@@ -671,15 +673,16 @@ parts](https://developer.mozilla.org/en-US/docs/Web/CSS/::part) are exported,
671
673
which you can style with additional rules not covered by the above CSS custom
0 commit comments