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
After following the instructions here I run into the following two errors:
/src/node_modules/.bin/tsc --pretty -p ./browser
node_modules/@types/webcomponents.js/index.d.ts:39:9 - error TS2687: All declarations of 'extends' must have identical modifiers.
39 extends?: string;
~~~~~~~
That can be resolved by applying the following patch to node_modules/@types/webcomponents.js/index.d.ts:
@@ -36,7 + +36,7 @@
declare global {
// This contains duplicates of some types in lib.dom.d.ts in order to support typescript 2.0
interface ElementDefinitionOptions {
- extends?: string;+ extends: string;
}
interface ShadowRoot extends DocumentFragment {
And after that
/src/node_modules/.bin/tsc --pretty -p ./renderer
node_modules/marked-sanitizer-github/index.ts:200:46 - error TS2345: Argument of type '{ onopentag: (name: string, attrs: { [s: string]: string; }) => void; oncomment: () => void; }' is not assignable to parameter of type 'DomHandler'.
Property 'onparserinit' is missing in type '{ onopentag: (name: string, attrs: { [s: string]: string; }) => void; oncomment: () => void; }'.
200 private readonly parser = new HTMLParser({
~
201 onopentag: (name, attrs) => {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
208 // Note: onerror is not handled because no error occurs while only parsing an opening tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209 });
~~~~~
To resolve that I needed to add all the callbacks defined by the HTMLParser object to the initialization in node_modules/marked-sanitizer-github/index.ts:
@@ -206,6 +206,15 @@
},
// Note: CDATA (cdatastart) is not handled
// Note: onerror is not handled because no error occurs while only parsing an opening tag
+ onparserinit: () => {},+ onend: () => {},+ onreset: () => {},+ onerror: () => {},+ onclosetag: () => {},+ oncommentend: () => {},+ ontext: () => {},+ oncdatastart: () => {},+ onprocessinginstruction: () => {},
});
reset() {
The text was updated successfully, but these errors were encountered:
After following the instructions here I run into the following two errors:
That can be resolved by applying the following patch to
node_modules/@types/webcomponents.js/index.d.ts
:And after that
To resolve that I needed to add all the callbacks defined by the
HTMLParser
object to the initialization innode_modules/marked-sanitizer-github/index.ts
:The text was updated successfully, but these errors were encountered: