-
Notifications
You must be signed in to change notification settings - Fork 775
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
feat(telemetry): add stencil config to telemetry object #3401
Conversation
|
Path | Error Count |
---|---|
src/compiler/config/test/validate-dev-server.spec.ts | 66 |
src/compiler/config/test/validate-output-www.spec.ts | 64 |
src/compiler/prerender/prerender-main.ts | 42 |
src/screenshot/connector-base.ts | 40 |
src/dev-server/index.ts | 39 |
src/mock-doc/node.ts | 37 |
src/mock-doc/serialize-node.ts | 36 |
src/compiler/sys/tests/in-memory-fs.spec.ts | 34 |
src/testing/puppeteer/puppeteer-browser.ts | 34 |
src/screenshot/screenshot-compare.ts | 33 |
src/testing/jest/jest-config.ts | 33 |
src/compiler/transformers/test/parse-props.spec.ts | 32 |
src/dev-server/server-process.ts | 32 |
src/compiler/config/test/validate-testing.spec.ts | 30 |
src/runtime/vdom/vdom-render.ts | 30 |
src/testing/jest/jest-screenshot.ts | 30 |
src/compiler/sys/typescript/typescript-config.ts | 28 |
src/testing/spec-page.ts | 28 |
src/compiler/build/build-stats.ts | 27 |
src/compiler/output-targets/dist-lazy/generate-lazy-module.ts | 26 |
Our most common errors
Typescript Error Code | Count | Error messages |
---|---|---|
TS2532 | 1130 | Error messagesObject is possibly 'undefined'. |
TS2345 | 743 | Error messagesArgument of type 'Logger | undefined' is not assignable to parameter of type 'Logger'.Type 'undefined' is not assignable to type 'Logger'. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'string[] | undefined' is not assignable to parameter of type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. Argument of type '"g" | "prerender" | "info" | "build" | "docs" | "generate" | "serve" | "telemetry" | "test" | "version" | undefined' is not assignable to parameter of type 'TaskCommand'. Type 'undefined' is not assignable to type 'TaskCommand'. Argument of type '"g" | "prerender" | "info" | "build" | "docs" | "generate" | "serve" | "telemetry" | "test" | undefined' is not assignable to parameter of type 'TaskCommand'. Type 'undefined' is not assignable to type 'TaskCommand'. Argument of type '"g" | "prerender" | "build" | "docs" | "generate" | "serve" | "telemetry" | "test" | undefined' is not assignable to parameter of type 'TaskCommand'. Type 'undefined' is not assignable to type 'TaskCommand'. Argument of type 'Promise<(() => void) | null>' is not assignable to parameter of type 'Promise<() => void>'. Argument of type 'null' is not assignable to parameter of type 'BuildResultsComponentGraph'. Argument of type 'DevServerConfig | undefined' is not assignable to parameter of type 'StencilDevServerConfig'. Type 'undefined' is not assignable to type 'StencilDevServerConfig'. Argument of type 'Promise<(() => void) | null>' is not assignable to parameter of type 'Promise<() => void>'. Type '(() => void) | null' is not assignable to type '() => void'. Type 'null' is not assignable to type '() => void'. Argument of type 'number | undefined' is not assignable to parameter of type 'number'. Type 'undefined' is not assignable to type 'number'. Argument of type 'string' is not assignable to parameter of type 'never'. Argument of type 'ComponentRuntimeHostListener[] | undefined' is not assignable to parameter of type 'ComponentRuntimeHostListener[]'. Type 'undefined' is not assignable to type 'ComponentRuntimeHostListener[]'. Argument of type 'HTMLScriptElement | null | undefined' is not assignable to parameter of type 'HTMLScriptElement'. Type 'undefined' is not assignable to type 'HTMLScriptElement'. Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'. Argument of type 'Diagnostic[] | undefined' is not assignable to parameter of type 'readonly Diagnostic[]'. Type 'undefined' is not assignable to type 'readonly Diagnostic[]'. Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. Argument of type 'BuildConditionals | undefined' is not assignable to parameter of type 'BuildConditionals'. Type 'undefined' is not assignable to type 'BuildConditionals'. Argument of type 'Diagnostic[] | undefined' is not assignable to parameter of type 'Diagnostic[]'. Type 'undefined' is not assignable to type 'Diagnostic[]'. Argument of type 'WorkerMeta | undefined' is not assignable to parameter of type 'WorkerMeta'. Type 'undefined' is not assignable to type 'WorkerMeta'. Argument of type 'CopyTask[] | undefined' is not assignable to parameter of type 'boolean | CopyTask[]'. Argument of type '{ type: "copy"; dir: string | undefined; copy: d.CopyTask[]; }' is not assignable to parameter of type 'OutputTargetCopy | OutputTargetDistCustomElementsBundle'. Types of property 'dir' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'CopyTask[] | undefined' is not assignable to parameter of type 'boolean | CopyTask[]'. Type 'undefined' is not assignable to type 'boolean | CopyTask[]'. Argument of type '{ type: "copy"; dir: string | undefined; copy: CopyTask[]; }' is not assignable to parameter of type 'OutputTargetCopy | OutputTargetDistCustomElements | OutputTargetDistTypes'. Types of property 'dir' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'OutputTargetWww' is not assignable to parameter of type 'never'. Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'Set<string | null>' is not assignable to parameter of type 'Set'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Argument of type 'Set<string | null>' is not assignable to parameter of type 'Set'. Argument of type 'RollupConfig | undefined' is not assignable to parameter of type 'RollupConfig'. Type 'undefined' is not assignable to type 'RollupConfig'. Argument of type '(string[] | undefined)[]' is not assignable to parameter of type 'string[][]'. Type 'string[] | undefined' is not assignable to type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. Argument of type 'ComponentCompilerMeta | undefined' is not assignable to parameter of type 'ComponentCompilerMeta'. Type 'undefined' is not assignable to type 'ComponentCompilerMeta'. Argument of type 'SourceTarget | undefined' is not assignable to parameter of type 'SourceTarget'. Type 'undefined' is not assignable to type 'SourceTarget'. Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'. Type 'undefined' is not assignable to type 'boolean'. Argument of type '(string | undefined)[]' is not assignable to parameter of type 'string[]'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type '(string | undefined)[]' is not assignable to parameter of type 'string[]'. Argument of type 'RollupSourceMap | undefined' is not assignable to parameter of type 'SourceMap'. Type 'undefined' is not assignable to type 'SourceMap'. Argument of type 'EntryModule | undefined' is not assignable to parameter of type 'EntryModule'. Type 'undefined' is not assignable to type 'EntryModule'. Argument of type '(Module | undefined)[]' is not assignable to parameter of type 'Module[]'. Type 'Module | undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'Module'. Argument of type 'Document | null' is not assignable to parameter of type 'Document'. Type 'null' is not assignable to type 'Document'. Argument of type 'Document | null' is not assignable to parameter of type 'Node | MockNode'. Type 'null' is not assignable to type 'Node | MockNode'. Argument of type 'HydrateAnchorElement' is not assignable to parameter of type '{ [attrName: string]: string; }'. 'string' index signatures are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'URL | null' is not assignable to parameter of type 'URL'. Type 'null' is not assignable to type 'URL'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | URL'. Argument of type 'SitemapXmpResults | null' is not assignable to parameter of type 'SitemapXmpResults'. Type 'null' is not assignable to type 'SitemapXmpResults'. Argument of type 'Map<string, string[]> | undefined' is not assignable to parameter of type 'Map<string, string[]>'. Type 'undefined' is not assignable to type 'Map<string, string[]>'. Argument of type 'undefined' is not assignable to parameter of type 'string'. Argument of type 'ServiceWorkerConfig | undefined' is not assignable to parameter of type 'ServiceWorkerConfig'. Type 'undefined' is not assignable to type 'ServiceWorkerConfig'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | URL'. Type 'undefined' is not assignable to type 'string | URL'. Argument of type 'CssNode[] | null | undefined' is not assignable to parameter of type 'void | CssNode[]'. Argument of type 'CssNode[] | null | undefined' is not assignable to parameter of type 'void | CssNode[]'. Type 'null' is not assignable to type 'void | CssNode[]'. Argument of type 'null' is not assignable to parameter of type 'string'. Argument of type 'CompilerSystemCreateDirectoryOptions | undefined' is not assignable to parameter of type 'CompilerSystemCreateDirectoryOptions'. Type 'undefined' is not assignable to type 'CompilerSystemCreateDirectoryOptions'. Argument of type 'null' is not assignable to parameter of type 'CompilerFileWatcherEvent'. Argument of type 'null' is not assignable to parameter of type 'InMemoryFileSystem'. Argument of type 'undefined' is not assignable to parameter of type 'TypeChecker'. Argument of type 'CollectionBundleManifest[] | undefined' is not assignable to parameter of type 'any[]'. Type 'undefined' is not assignable to type 'any[]'. Argument of type 'Module | undefined' is not assignable to parameter of type 'Module'. Type 'undefined' is not assignable to type 'Module'. Argument of type 'NodeArray | undefined' is not assignable to parameter of type 'NodeArray | HeritageClause[]'. Type 'undefined' is not assignable to type 'NodeArray | HeritageClause[]'. Argument of type 'Block | undefined' is not assignable to parameter of type 'Block'. Type 'undefined' is not assignable to type 'Block'. Argument of type 'undefined' is not assignable to parameter of type 'readonly ParameterDeclaration[]'. Argument of type 'Expression | undefined' is not assignable to parameter of type 'Expression'. Type 'undefined' is not assignable to type 'Expression'. Argument of type 'Symbol | undefined' is not assignable to parameter of type 'Symbol'. Type 'undefined' is not assignable to type 'Symbol'. Argument of type 'string | false' is not assignable to parameter of type 'string'. Type 'boolean' is not assignable to type 'string'. Argument of type 'TypeNode | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type '(PropertyAssignment | null)[]' is not assignable to parameter of type 'readonly ObjectLiteralElementLike[]'. Type 'PropertyAssignment | null' is not assignable to type 'ObjectLiteralElementLike'. Type 'null' is not assignable to type 'ObjectLiteralElementLike'. Argument of type 'Signature | undefined' is not assignable to parameter of type 'Signature'. Type 'undefined' is not assignable to type 'Signature'. Argument of type '(PropertyAssignment | null)[]' is not assignable to parameter of type 'readonly ObjectLiteralElementLike[]'. Argument of type 'Identifier | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'undefined' is not assignable to parameter of type 'readonly ClassElement[]'. Argument of type 'null' is not assignable to parameter of type 'Config | undefined'. Argument of type 'Config | undefined' is not assignable to parameter of type 'Config'. Type 'undefined' is not assignable to type 'Config'. Argument of type 'null' is not assignable to parameter of type 'CollectionCompilerMeta'. Argument of type 'PropertyName | undefined' is not assignable to parameter of type 'PropertyName'. Type 'undefined' is not assignable to type 'PropertyName'. Argument of type 'NamedExportBindings | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'Declaration | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'Identifier | undefined' is not assignable to parameter of type 'string | BindingName'. Type 'undefined' is not assignable to type 'string | BindingName'. Argument of type 'ScriptTarget | undefined' is not assignable to parameter of type 'ScriptTarget'. Type 'undefined' is not assignable to type 'ScriptTarget'. Argument of type 'Diagnostic' is not assignable to parameter of type 'DiagnosticWithLocation'. Types of property 'file' are incompatible. Type 'SourceFile | undefined' is not assignable to type 'SourceFile'. Type 'undefined' is not assignable to type 'SourceFile'. Argument of type '(...pathSegments: string[]) => string | undefined' is not assignable to parameter of type '(...args: string[]) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'OpenInEditorCallback | undefined' is not assignable to parameter of type 'OpenInEditorCallback'. Type 'undefined' is not assignable to type 'OpenInEditorCallback'. Argument of type 'CompilerWatcher | undefined' is not assignable to parameter of type 'CompilerWatcher'. Type 'undefined' is not assignable to type 'CompilerWatcher'. Argument of type '{ editor: string | undefined; }' is not assignable to parameter of type 'OpenInEditorOptions'. Types of property 'editor' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Argument of type 'string | undefined' is not assignable to parameter of type 'PathLike'. Type 'undefined' is not assignable to type 'PathLike'. Argument of type 'DevServerConfig | undefined' is not assignable to parameter of type 'DevServerConfig'. Type 'undefined' is not assignable to type 'DevServerConfig'. Argument of type 'CompilerBuildResults | undefined' is not assignable to parameter of type 'CompilerBuildResults'. Type 'undefined' is not assignable to type 'CompilerBuildResults'. Argument of type 'Window | undefined' is not assignable to parameter of type 'Window'. Type 'undefined' is not assignable to type 'Window'. Argument of type 'SerializeDocumentOptions | undefined' is not assignable to parameter of type 'HydrateDocumentOptions'. Type 'undefined' is not assignable to type 'HydrateDocumentOptions'. Argument of type 'HydrateDocumentOptions | undefined' is not assignable to parameter of type 'HydrateDocumentOptions'. Type 'undefined' is not assignable to type 'HydrateDocumentOptions'. Argument of type 'MockNode | null' is not assignable to parameter of type 'MockNode'. Type 'null' is not assignable to type 'MockNode'. Argument of type 'ShadowRoot | null' is not assignable to parameter of type 'Node'. Type 'null' is not assignable to type 'Node'. Argument of type 'null' is not assignable to parameter of type 'string | Node'. Argument of type 'null' is not assignable to parameter of type 'string | boolean | undefined'. Argument of type '(Window & typeof globalThis) | null' is not assignable to parameter of type 'Window'. Type 'null' is not assignable to type 'Window'. Argument of type 'string | null | undefined' is not assignable to parameter of type 'string | undefined'. Argument of type 'HostRef | undefined' is not assignable to parameter of type 'HostRef'. Type 'undefined' is not assignable to type 'HostRef'. Argument of type 'this' is not assignable to parameter of type 'HostElement'. Type 'HostElement' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/declarations/stencil-private").HostElement'. The types returned by 'componentOnReady()' are incompatible between these types. Type 'Promise | undefined' is not assignable to type 'Promise'. Type 'undefined' is not assignable to type 'Promise'. Argument of type 'this' is not assignable to parameter of type 'HostElement'. Argument of type 'string | null' is not assignable to parameter of type 'string | undefined'. Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor'. Argument of type 'HTMLElement | undefined' is not assignable to parameter of type 'HTMLElement'. Type 'undefined' is not assignable to type 'HTMLElement'. Argument of type 'HostElement | undefined' is not assignable to parameter of type 'HostElement'. Type 'undefined' is not assignable to type 'HostElement'. Argument of type 'HostElement | undefined' is not assignable to parameter of type 'EventTarget'. Type 'undefined' is not assignable to type 'EventTarget'. Argument of type 'HostElement | undefined' is not assignable to parameter of type 'Element'. Type 'undefined' is not assignable to type 'Element'. Argument of type 'VNode[] | undefined' is not assignable to parameter of type 'VNode[]'. Type 'undefined' is not assignable to type 'VNode[]'. Argument of type 'null | undefined' is not assignable to parameter of type 'ChildType'. Type 'undefined' is not assignable to type 'ChildType'. Argument of type 'VNode | null' is not assignable to parameter of type 'ChildType'. Type 'null' is not assignable to type 'ChildType'. Argument of type 'VNode | undefined' is not assignable to parameter of type 'ChildType'. Type 'undefined' is not assignable to type 'ChildType'. Argument of type 'VNode | null | undefined' is not assignable to parameter of type 'ChildType'. Type 'undefined' is not assignable to type 'ChildType'. Argument of type 'null | undefined' is not assignable to parameter of type 'ChildType'. Argument of type 'RenderNode | undefined' is not assignable to parameter of type 'Node | null'. Type 'undefined' is not assignable to type 'Node | null'. Argument of type 'VNode | undefined' is not assignable to parameter of type 'VNode'. Type 'undefined' is not assignable to type 'VNode'. Argument of type 'null' is not assignable to parameter of type 'VNode'. Argument of type 'RenderNode | undefined' is not assignable to parameter of type 'Node'. Type 'undefined' is not assignable to type 'Node'. Argument of type 'null' is not assignable to parameter of type 'RenderNode'. Argument of type 'ScreenshotDiff | undefined' is not assignable to parameter of type 'ScreenshotDiff'. Type 'undefined' is not assignable to type 'ScreenshotDiff'. Argument of type 'string | undefined' is not assignable to parameter of type 'PathLike'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | SemVer'. Type 'undefined' is not assignable to type 'string | SemVer'. Argument of type 'string | undefined' is not assignable to parameter of type 'string | SemVer'. Argument of type 'null' is not assignable to parameter of type 'number | undefined'. Argument of type 'null' is not assignable to parameter of type 'number | PromiseLike'. Argument of type 'CompilerWorkerTask | undefined' is not assignable to parameter of type 'CompilerWorkerTask'. Type 'undefined' is not assignable to type 'CompilerWorkerTask'. Argument of type 'null' is not assignable to parameter of type 'CompilerWorkerTask'. Argument of type 'TestingConfig | undefined' is not assignable to parameter of type 'TestingConfig'. Type 'undefined' is not assignable to type 'TestingConfig'. Argument of type 'undefined' is not assignable to parameter of type 'ErrorHandler'. Argument of type 'string | undefined' is not assignable to parameter of type 'MockRequestInfo'. Type 'undefined' is not assignable to type 'MockRequestInfo'. Argument of type 'string | undefined' is not assignable to parameter of type 'MockRequestInfo'. Argument of type 'MockResponse | undefined' is not assignable to parameter of type 'MockResponse'. Type 'undefined' is not assignable to type 'MockResponse'. Argument of type 'this' is not assignable to parameter of type 'E2EElementInternal'. Type 'E2EElement' is not assignable to type 'E2EElementInternal'. Types of property 'find' are incompatible. Type '(selector: string) => Promise<E2EElement | null>' is not assignable to type '(selector: FindSelector) => Promise'. Argument of type 'string | null | undefined' is not assignable to parameter of type 'SerializableOrJSHandle'. Type 'undefined' is not assignable to type 'SerializableOrJSHandle'. Argument of type 'this' is not assignable to parameter of type 'E2EElementInternal'. Argument of type 'ElementHandle | null' is not assignable to parameter of type 'ElementHandle'. Type 'null' is not assignable to type 'ElementHandle'. Argument of type '{ viewport: EmulateViewport | undefined; userAgent: string | undefined; }' is not assignable to parameter of type '{ viewport: Viewport; userAgent: string; }'. Types of property 'viewport' are incompatible. Type 'EmulateViewport | undefined' is not assignable to type 'Viewport'. Type 'undefined' is not assignable to type 'Viewport'. Argument of type 'AnyHTMLElement | undefined' is not assignable to parameter of type 'RuntimeRef'. Type 'undefined' is not assignable to type 'RuntimeRef'. Argument of type 'null' is not assignable to parameter of type 'SourceMap | undefined'. |
TS2322 | 555 | Error messagesType 'null' is not assignable to type 'TaskCommand | undefined'.Type 'null' is not assignable to type 'string[] | undefined'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'null' is not assignable to type 'DevServerConfig | undefined'. Type 'null' is not assignable to type 'DevServer'. Type 'undefined' is not assignable to type 'number'. Type 'string[] | undefined' is not assignable to type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. Type 'TaskCommand | undefined' is not assignable to type 'TaskCommand'. Type 'undefined' is not assignable to type 'TaskCommand'. Type 'PackageJsonData | null' is not assignable to type 'PackageJsonData'. Type 'null' is not assignable to type 'PackageJsonData'. Type 'undefined' is not assignable to type 'ComponentConstructor | Promise'. Type 'HTMLElement | null' is not assignable to type 'HTMLElement'. Type 'null' is not assignable to type 'HTMLElement'. Type 'null' is not assignable to type 'RollupResult[]'. Type '({ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; } | { ...; })[]' is not assignable to type 'RollupResult[]'. Type '{ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; } | { ...; }' is not assignable to type 'RollupResult'. Type '{ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; }' is not assignable to type 'RollupResult'. Type '{ type: "chunk"; fileName: string; map: SourceMap | undefined; code: string; moduleFormat: ModuleFormat | undefined; entryKey: string; imports: string[]; isEntry: boolean; ... 4 more ...; content?: undefined; }' is not assignable to type 'RollupChunkResult'. Types of property 'moduleFormat' are incompatible. Type 'ModuleFormat | undefined' is not assignable to type 'ModuleFormat'. Type 'undefined' is not assignable to type 'ModuleFormat'. Type 'null' is not assignable to type 'CompilerBuildResults'. Type 'undefined' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'Document'. Type 'null' is not assignable to type 'Promise'. Type 'null' is not assignable to type 'LoggerTimeSpan'. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. Type 'boolean | "prod" | undefined' is not assignable to type 'boolean | "prod"'. Type 'undefined' is not assignable to type 'boolean | "prod"'. Type 'BuildResultsComponentGraph | undefined' is not assignable to type 'BuildResultsComponentGraph'. Type 'undefined' is not assignable to type 'BuildResultsComponentGraph'. Type 'RollupResults | undefined' is not assignable to type 'RollupResults'. Type 'undefined' is not assignable to type 'RollupResults'. Type '{ name: string | undefined; source: string; tags: any[]; }[]' is not assignable to type '{ name: string; source: string; tags: string[]; }[]'. Type '{ name: string | undefined; source: string; tags: any[]; }' is not assignable to type '{ name: string; source: string; tags: string[]; }'. Types of property 'name' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'null' is not assignable to type 'CompilerWorkerContext'. Type 'null' is not assignable to type 'WatchOfConfigFile'. Type 'null' is not assignable to type '{ program: WatchOfConfigFile; rebuild: () => void; }'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Type 'ComponentCompilerMeta | undefined' is not assignable to type 'ComponentCompilerMeta'. Type 'undefined' is not assignable to type 'ComponentCompilerMeta'. Type 'null' is not assignable to type 'string | undefined'. Type '{ code: string; exports: string[]; workerMsgId: string; dependencies: string[]; } | null' is not assignable to type 'WorkerMeta | undefined'. Type 'null' is not assignable to type 'WorkerMeta | undefined'. Type 'WorkerMeta | undefined' is not assignable to type 'WorkerMeta'. Type 'undefined' is not assignable to type 'WorkerMeta'. Type 'CompilerSystem | undefined' is not assignable to type 'CompilerSystem'. Type 'undefined' is not assignable to type 'CompilerSystem'. Type 'Logger | undefined' is not assignable to type 'Logger'. Type 'undefined' is not assignable to type 'Logger'. Type 'import("/home/runner/work/stencil/stencil/src/compiler/cache").Cache' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/declarations/stencil-private").Cache'. The types returned by 'get(...)' are incompatible between these types. Type 'Promise<string | null>' is not assignable to type 'Promise'. Type 'null' is not assignable to type 'UnvalidatedConfig'. Type 'null' is not assignable to type 'Record<string, any>'. Type 'null' is not assignable to type 'string[]'. Type 'null' is not assignable to type 'UnvalidatedConfig'. Type 'null' is not assignable to type '{ config?: UnvalidatedConfig | undefined; }'. Type '{ dir: string; buildDir: string; collectionDir: string | null; typesDir: string; esmLoaderPath: string; copy: d.CopyTask[]; polyfills: boolean | undefined; empty: boolean; type: "dist"; }' is not assignable to type 'Required'. Types of property 'polyfills' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'string' is not assignable to type 'never'. Type 'string | undefined' is not assignable to type 'never'. Type 'undefined' is not assignable to type 'never'. Type 'boolean | undefined' is not assignable to type 'never'. Type 'undefined' is not assignable to type 'never'. Type 'boolean' is not assignable to type 'never'. Type 'CopyTask[]' is not assignable to type 'never'. Type 'null' is not assignable to type 'number | undefined'. Type 'null' is not assignable to type 'HistoryApiFallback | undefined'. Type 'null' is not assignable to type 'CopyTask[] | undefined'. Type '{ dirPath: string; filePath: string; fileName: string; readmePath: string; usagesDir: string; tag: string; readme: string | undefined; usage: JsonDocsUsage; docs: string; docsTags: CompilerJsDocTagInfo[]; ... 11 more ...; listeners: JsonDocsListener[]; }[]' is not assignable to type 'JsonDocsComponent[]'. Type '{ dirPath: string; filePath: string; fileName: string; readmePath: string; usagesDir: string; tag: string; readme: string | undefined; usage: d.JsonDocsUsage; docs: string; docsTags: d.CompilerJsDocTagInfo[]; ... 11 more ...; listeners: d.JsonDocsListener[]; }' is not assignable to type 'JsonDocsComponent'. Types of property 'readme' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '{ name: string; type: string; mutable: boolean; attr: string | undefined; reflectToAttr: boolean; docs: string; docsTags: CompilerJsDocTagInfo[]; default: string | undefined; deprecation: string | undefined; values: JsonDocsValue[]; optional: boolean; required: boolean; }[]' is not assignable to type 'JsonDocsProp[]'. Type '{ name: string; type: string; mutable: boolean; attr: string | undefined; reflectToAttr: boolean; docs: string; docsTags: d.CompilerJsDocTagInfo[]; default: string | undefined; deprecation: string | undefined; values: d.JsonDocsValue[]; optional: boolean; required: boolean; }' is not assignable to type 'JsonDocsProp'. Types of property 'default' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '{ name: string; type: string; mutable: false; attr: string; reflectToAttr: false; docs: string; docsTags: never[]; default: undefined; deprecation: undefined; values: JsonDocsValue[]; optional: true; required: false; }[]' is not assignable to type 'JsonDocsProp[]'. Type '{ name: string; type: string; mutable: false; attr: string; reflectToAttr: false; docs: string; docsTags: never[]; default: undefined; deprecation: undefined; values: d.JsonDocsValue[]; optional: true; required: false; }' is not assignable to type 'JsonDocsProp'. Types of property 'default' are incompatible. Type 'undefined' is not assignable to type 'string'. Type '(ComponentCompilerMeta | undefined)[]' is not assignable to type 'ComponentCompilerMeta[]'. Type 'ComponentCompilerMeta | undefined' is not assignable to type 'ComponentCompilerMeta'. Type 'undefined' is not assignable to type 'ComponentCompilerMeta'. Type '(ComponentCompilerMeta | undefined)[][]' is not assignable to type 'readonly ComponentCompilerMeta[][]'. Type '(ComponentCompilerMeta | undefined)[]' is not assignable to type 'ComponentCompilerMeta[]'. Type 'null' is not assignable to type 'SourceMap | undefined'. Type '{ name: string | undefined; tags: string[]; }[]' is not assignable to type 'CollectionDependencyData[]'. Type '{ name: string | undefined; tags: string[]; }' is not assignable to type 'CollectionDependencyData'. Types of property 'name' are incompatible. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'string | undefined' is not assignable to type 'string | number'. Type 'undefined' is not assignable to type 'string | number'. Type 'SourceMap | undefined' is not assignable to type 'SourceMap'. Type 'undefined' is not assignable to type 'SourceMap'. Type 'string | null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'Function'. Type 'null' is not assignable to type 'Map<string, string[]>'. Type 'null' is not assignable to type 'PrerenderConfig'. Type 'null' is not assignable to type 'Set'. Type 'null' is not assignable to type 'HydrateAnchorElement[]'. Type 'null' is not assignable to type '(prerenderRequest: PrerenderUrlRequest) => Promise'. Type 'RegExpExecArray | null' is not assignable to type 'RegExpExecArray'. Type 'null' is not assignable to type 'RegExpExecArray'. Type 'CssNode | null' is not assignable to type 'void | CssNode'. Type 'null' is not assignable to type 'void | CssNode'. Type 'CssNode | null' is not assignable to type 'CssNode'. Type 'null' is not assignable to type 'CssNode'. Type 'CssNode | null' is not assignable to type 'void | CssNode'. Type 'null' is not assignable to type '() => string'. Type 'null' is not assignable to type 'number'. Type 'null' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'boolean | undefined'. Type 'FsItem | undefined' is not assignable to type 'FsItem'. Type 'undefined' is not assignable to type 'FsItem'. Type 'null' is not assignable to type 'CompilerFileWatcherCallback[]'. Type '(key: string) => string | undefined' is not assignable to type '(key: string) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '(p: string) => Promise<string | undefined>' is not assignable to type '{ (p: string): Promise; (p: string, encoding: "utf8"): Promise; (p: string, encoding: "binary"): Promise; }'. Type 'Promise<string | undefined>' is not assignable to type 'Promise'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '(p: string) => string | undefined' is not assignable to type '(p: string, encoding?: string | undefined) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type '((maxConcurrentWorkers: number) => WorkerMainController) | null' is not assignable to type '((maxConcurrentWorkers: number) => WorkerMainController) | undefined'. Type 'null' is not assignable to type '((maxConcurrentWorkers: number) => WorkerMainController) | undefined'. Type 'null' is not assignable to type 'ResolvedModuleWithFailedLookupLocations'. Type 'null' is not assignable to type 'Worker'. Type 'CollectionCompilerMeta | undefined' is not assignable to type 'CollectionCompilerMeta'. Type 'undefined' is not assignable to type 'CollectionCompilerMeta'. Type 'null' is not assignable to type 'ComponentCompilerStaticEvent'. Type 'null' is not assignable to type 'PropertyAssignment'. Type 'boolean | null' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'boolean'. Type 'undefined' is not assignable to type 'ComponentCompilerVirtualProperty'. Type '{ name: string; method: string; bubbles: boolean; cancelable: boolean; composed: boolean; docs: CompilerJsDoc; complexType: ComponentCompilerEventComplexType; internal: boolean | undefined; }[]' is not assignable to type 'ComponentCompilerEvent[]'. Type '{ name: string; method: string; bubbles: boolean; cancelable: boolean; composed: boolean; docs: d.CompilerJsDoc; complexType: d.ComponentCompilerEventComplexType; internal: boolean | undefined; }' is not assignable to type 'ComponentCompilerEvent'. Types of property 'internal' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type '{ name: string; docs: CompilerJsDoc; complexType: ComponentCompilerMethodComplexType; internal: boolean | undefined; }[]' is not assignable to type 'ComponentCompilerMethod[]'. Type '{ name: string; docs: d.CompilerJsDoc; complexType: d.ComponentCompilerMethodComplexType; internal: boolean | undefined; }' is not assignable to type 'ComponentCompilerMethod'. Types of property 'internal' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type '{ name: string; type: ComponentCompilerPropertyType; attribute: string | undefined; reflect: boolean; mutable: boolean; required: boolean; optional: boolean; defaultValue: string | undefined; complexType: ComponentCompilerPropertyComplexType; docs: CompilerJsDoc; internal: boolean | undefined; }[]' is not assignable to type 'ComponentCompilerProperty[]'. Type '{ name: string; type: d.ComponentCompilerPropertyType; attribute: string | undefined; reflect: boolean; mutable: boolean; required: boolean; optional: boolean; defaultValue: string | undefined; complexType: d.ComponentCompilerPropertyComplexType; docs: d.CompilerJsDoc; internal: boolean | undefined; }' is not assignable to type 'ComponentCompilerProperty'. Types of property 'internal' are incompatible. Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'null' is not assignable to type 'ImportData'. Type 'undefined' is not assignable to type '"queryparams" | null'. Type 'null' is not assignable to type 'WeakSet'. Type 'null' is not assignable to type 'Module'. Type 'Module | undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'Module'. Type 'undefined' is not assignable to type 'CompilerJsDoc'. Type '{ [x: string]: d.TypesMemberNameData[] | undefined; }' is not assignable to type 'TypesImportData'. 'string' index signatures are incompatible. Type 'TypesMemberNameData[] | undefined' is not assignable to type 'TypesMemberNameData[]'. Type 'undefined' is not assignable to type 'TypesMemberNameData[]'. Type 'string | undefined' is not assignable to type 'string | null'. Type '((data: { file: string; line: number; column: number; }) => void) | null' is not assignable to type 'OpenInEditorCallback | undefined'. Type 'null' is not assignable to type 'OpenInEditorCallback | undefined'. Type 'null' is not assignable to type 'WebSocket'. Type 'null' is not assignable to type 'BuildOnEventRemove'. Type 'null' is not assignable to type '() => void'. Type 'null' is not assignable to type '(msg: DevServerMessage) => void'. Type 'DevServerConfig | undefined' is not assignable to type 'DevServerConfig'. Type 'undefined' is not assignable to type 'DevServerConfig'. Type 'null' is not assignable to type '{ open(openId: string): Promise; }'. Type 'string | null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'Promise<DevServerEditor[]>'. Type 'null' is not assignable to type '(req: IncomingMessage, res: ServerResponse, next: () => void) => void'. Type 'null' is not assignable to type 'URL'. Type 'null' is not assignable to type 'URLSearchParams'. Type 'PageReloadStrategy | undefined' is not assignable to type 'PageReloadStrategy'. Type 'undefined' is not assignable to type 'PageReloadStrategy'. Type 'null' is not assignable to type 'Server'. Type 'null' is not assignable to type 'DevWebSocket'. Type 'null' is not assignable to type 'DevServerContext'. Type 'DevWebSocket | null' is not assignable to type 'DevWebSocket'. Type 'null' is not assignable to type 'DevWebSocket'. Type 'string | undefined' is not assignable to type 'string | null'. Type 'undefined' is not assignable to type 'string | null'. Type 'null' is not assignable to type 'ChildProcess'. Type 'null' is not assignable to type 'HydrateApp'. Type 'null' is not assignable to type 'ComponentConstructor'. Type '(this: HostElement) => Promise | undefined' is not assignable to type '() => Promise'. Type 'Promise | undefined' is not assignable to type 'Promise'. Type 'undefined' is not assignable to type 'Promise'. Type 'null' is not assignable to type 'Window & typeof globalThis'. Type 'null' is not assignable to type 'Window'. Type 'null' is not assignable to type 'Window & typeof globalThis'. Type 'null' is not assignable to type 'MockCSSStyleSheet'. Type 'null' is not assignable to type 'string | boolean'. Type 'null' is not assignable to type 'Location'. Type 'null' is not assignable to type 'MockNode'. Type 'null' is not assignable to type 'MockElement'. Type 'null' is not assignable to type 'SVGSVGElement'. Type 'null' is not assignable to type 'SVGElement'. Type 'null' is not assignable to type 'EventTarget'. Type 'null' is not assignable to type 'MockEventListener[]'. Type 'null' is not assignable to type 'MockDocument'. Type '{ name: string; value: string; namespace: string; prefix: null; }[]' is not assignable to type 'Attribute[]'. Type '{ name: string; value: string; namespace: string; prefix: null; }' is not assignable to type 'Attribute'. Types of property 'prefix' are incompatible. Type 'null' is not assignable to type 'string | undefined'. Type 'ParentNode | null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'Document'. Type 'string | null | undefined' is not assignable to type 'string | undefined'. Type 'never[] | null' is not assignable to type 'RenderNode[]'. Type 'null' is not assignable to type 'RenderNode[]'. Type 'null' is not assignable to type 'VNode[]'. Type 'null' is not assignable to type 'string | number | undefined'. Type 'null' is not assignable to type 'string | number | Function'. Type 'RenderNode | null' is not assignable to type 'RenderNode'. Type 'null' is not assignable to type 'RenderNode'. Type 'HTMLElement | null' is not assignable to type 'EventTarget'. Type 'null' is not assignable to type 'EventTarget'. Type 'string | null | undefined' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'string | undefined'. Type 'null' is not assignable to type 'Set | undefined'. Type 'null' is not assignable to type '[string, any][] | undefined'. Type 'VNode[] | undefined' is not assignable to type 'VNode[]'. Type 'undefined' is not assignable to type 'VNode[]'. Type '(props: {}, children: VNode[], utils: FunctionalUtilities) => null' is not assignable to type 'FunctionalComponent<{}>'. Type 'null' is not assignable to type 'VNode | VNode[]'. Type '() => null' is not assignable to type 'FunctionalComponent<{}>'. Type 'null' is not assignable to type 'VNode | VNode[]'. Type 'null' is not assignable to type 'VNode'. Type 'undefined' is not assignable to type 'VNode'. Type 'RenderNode | undefined' is not assignable to type 'RenderNode'. Type 'undefined' is not assignable to type 'RenderNode'. Type 'RelocateNodeData | undefined' is not assignable to type 'RelocateNodeData'. Type 'undefined' is not assignable to type 'RelocateNodeData'. Type 'ChildNode | null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'Node'. Type 'null' is not assignable to type 'ScreenshotBuild'. Type 'null' is not assignable to type 'ScreenshotCache'. Type 'null' is not assignable to type 'Buffer'. Type 'null' is not assignable to type 'Screenshot'. Type '(() => void) | undefined' is not assignable to type '() => any'. Type 'undefined' is not assignable to type '() => any'. Type '() => null' is not assignable to type '(opts: { rootDir: string; moduleId: string; path: string; }) => string'. Type 'null' is not assignable to type 'string'. Type '() => null' is not assignable to type '(opts: { moduleId: string; path?: string | undefined; version?: string | undefined; }) => string'. Type 'null' is not assignable to type 'string'. Type '() => string | undefined' is not assignable to type '() => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. Type 'number | null' is not assignable to type 'number'. Type 'null' is not assignable to type 'number'. Type 'any[] | undefined' is not assignable to type 'any[]'. Type 'undefined' is not assignable to type 'any[]'. Type 'CompilerOptions | null' is not assignable to type 'CompilerOptions'. Type 'null' is not assignable to type 'CompilerOptions'. Type 'null' is not assignable to type 'ConfigBundle[] | undefined'. Type 'null' is not assignable to type 'OutputTarget[] | undefined'. Type 'null' is not assignable to type 'TestingConfig | undefined'. Type 'null' is not assignable to type 'Cache'. Type 'null' is not assignable to type 'BuildEvents'. Type 'null' is not assignable to type 'InMemoryFileSystem'. Type 'HostRef | undefined' is not assignable to type 'HostRef'. Type 'undefined' is not assignable to type 'HostRef'. Type 'Function | undefined' is not assignable to type 'Function'. Type 'undefined' is not assignable to type 'Function'. Type 'RafCallback | undefined' is not assignable to type 'Function'. Type 'undefined' is not assignable to type 'Function'. Type 'QueuedLoadModule | undefined' is not assignable to type 'QueuedLoadModule'. Type 'undefined' is not assignable to type 'QueuedLoadModule'. Type 'null' is not assignable to type 'ElementHandle'. Type 'null' is not assignable to type 'E2EPageInternal'. Type 'ElementHandle | null' is not assignable to type 'ElementHandle'. Type 'null' is not assignable to type 'ElementHandle'. Type 'null' is not assignable to type 'Promise<JSHandle>'. Type '(a?: any, b?: any) => Promise<ScreenshotDiff | undefined>' is not assignable to type '{ (): Promise; (description: string): Promise; (opts: ScreenshotOptions): Promise<...>; (description: string, opts: ScreenshotOptions): Promise<...>; }'. Type 'Promise<ScreenshotDiff | undefined>' is not assignable to type 'Promise'. Type 'ScreenshotDiff | undefined' is not assignable to type 'ScreenshotDiff'. Type 'undefined' is not assignable to type 'ScreenshotDiff'. Type 'null' is not assignable to type 'Function | undefined'. Type 'null' is not assignable to type 'CompilerWatcher'. Type 'null' is not assignable to type 'Promise'. Type 'Browser | null' is not assignable to type 'Browser'. Type 'null' is not assignable to type 'Browser'. Type 'null' is not assignable to type 'Config'. Type 'null' is not assignable to type 'Browser'. Type 'null' is not assignable to type 'SourceMap'. Type 'null' is not assignable to type 'PackageJsonData'. Type 'null' is not assignable to type '{ [moduleId: string]: string; } | undefined'. |
TS2531 | 198 | Error messagesObject is possibly 'null'. |
TS2454 | 48 | Error messagesVariable 'pkgJsonData' is used before being assigned.Variable 'cmp' is used before being assigned. Variable 'minifyOpts' is used before being assigned. Variable 'workerCtrl' is used before being assigned. Variable 'timespan' is used before being assigned. Variable 'content' is used before being assigned. Variable 'compilerExe' is used before being assigned. Variable 'outputText' is used before being assigned. Variable 'distDtsFilePath' is used before being assigned. Variable 'importResolvedFile' is used before being assigned. Variable 'win' is used before being assigned. Variable 'attrName' is used before being assigned. Variable 'oldValue' is used before being assigned. Variable 'newValue' is used before being assigned. Variable 'hostId' is used before being assigned. Variable 'promise' is used before being assigned. Variable 'textContent' is used before being assigned. Variable 'resolve' is used before being assigned. Variable 'opts' is used before being assigned. |
TS2722 | 43 | Error messagesCannot invoke an object which is possibly 'undefined'. |
TS2352 | 20 | Error messagesConversion of type 'null' to type 'string' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.Conversion of type 'null' to type 'CompilerSystem' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Conversion of type 'null' to type 'string[]' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Conversion of type '{ cmps: never[]; }' to type 'Module' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type '{ cmps: never[]; }' is missing the following properties from type 'Module': coreRuntimeApis, collectionName, dtsFilePath, excludeFromCollection, and 27 more. Conversion of type 'null' to type 'ScreenshotCache' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. |
TS2769 | 18 | Error messagesNo overload matches this call.Overload 1 of 2, '(o: {}): string[]', gave the following error. Argument of type 'BuildResultsComponentGraph | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. Overload 2 of 2, '(o: object): string[]', gave the following error. Argument of type 'BuildResultsComponentGraph | undefined' is not assignable to parameter of type 'object'. Type 'undefined' is not assignable to type 'object'. No overload matches this call. Overload 1 of 4, '(object: {}, method: never): SpyInstance<never, never>', gave the following error. Argument of type 'Logger | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. Overload 2 of 4, '(object: {}, method: never): SpyInstance<never, never>', gave the following error. Argument of type 'Logger | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. No overload matches this call. Overload 1 of 4, '(object: {}, method: never): SpyInstance<never, never>', gave the following error. Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. Overload 2 of 4, '(object: {}, method: never): SpyInstance<never, never>', gave the following error. Argument of type 'CompilerSystem | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. No overload matches this call. Overload 1 of 2, '(type: keyof DocumentEventMap, listener: (this: Document, ev: PointerEvent | MouseEvent | UIEvent | Event | ErrorEvent | ... 13 more ... | WheelEvent) => any, options?: boolean | ... 1 more ... | undefined): void', gave the following error. Argument of type '"e"' is not assignable to parameter of type 'keyof DocumentEventMap'. Overload 2 of 2, '(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void', gave the following error. Argument of type 'null' is not assignable to parameter of type 'EventListenerOrEventListenerObject'. No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): HostRule[]', gave the following error. Argument of type 'HostRule[] | undefined' is not assignable to parameter of type 'ConcatArray'. Type 'undefined' is not assignable to type 'ConcatArray'. Overload 2 of 2, '(...items: (HostRule | ConcatArray)[]): HostRule[]', gave the following error. Argument of type 'HostRule[] | undefined' is not assignable to parameter of type 'HostRule | ConcatArray'. Type 'undefined' is not assignable to type 'HostRule | ConcatArray'. No overload matches this call. The last overload gave the following error. Argument of type 'string | null' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. Type 'null' is not assignable to type '(substring: string, ...args: any[]) => string'. No overload matches this call. The last overload gave the following error. Argument of type 'string | null' is not assignable to parameter of type 'string | number | boolean | PseudoBigInt'. Type 'null' is not assignable to type 'string | number | boolean | PseudoBigInt'. No overload matches this call. Overload 1 of 2, '(configFileName: string, optionsToExtend: CompilerOptions | undefined, system: System, createProgram?: CreateProgram | undefined, reportDiagnostic?: DiagnosticReporter | undefined, reportWatchStatus?: WatchStatusReporter | undefined, watchOptionsToExtend?: WatchOptions | undefined, extraFileExtensions?: readonly FileExtensionInfo[] | undefined): WatchCompilerHostOfConfigFile<...>', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Overload 2 of 2, '(rootFiles: string[], options: CompilerOptions, system: System, createProgram?: CreateProgram | undefined, reportDiagnostic?: DiagnosticReporter | undefined, reportWatchStatus?: WatchStatusReporter | undefined, projectReferences?: readonly ProjectReference[] | undefined, watchOptions?: WatchOptions | undefined): WatchCompilerHostOfFilesAndCompilerOptions<...>', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string[]'. Type 'undefined' is not assignable to type 'string[]'. No overload matches this call. Overload 1 of 2, '(timeoutId: Timeout): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'Timeout'. Type 'null' is not assignable to type 'Timeout'. Overload 2 of 2, '(handle?: number | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'number | undefined'. Type 'null' is not assignable to type 'number | undefined'. No overload matches this call. Overload 1 of 2, '(timeoutId: Timeout): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'Timeout'. Type 'null' is not assignable to type 'Timeout'. Overload 2 of 2, '(handle?: number | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'number | undefined'. No overload matches this call. Overload 1 of 3, '(p: string, encoding: "utf8"): Promise', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Overload 2 of 3, '(p: string, encoding: "binary"): Promise', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. No overload matches this call. Overload 1 of 2, '(values: [] | readonly unknown[]): Promise<unknown[] | []>', gave the following error. Argument of type 'Promise[] | undefined' is not assignable to parameter of type '[] | readonly unknown[]'. Type 'undefined' is not assignable to type '[] | readonly unknown[]'. Overload 2 of 2, '(values: Iterable<void | PromiseLike>): Promise<void[]>', gave the following error. Argument of type 'Promise[] | undefined' is not assignable to parameter of type 'Iterable<void | PromiseLike>'. Type 'undefined' is not assignable to type 'Iterable<void | PromiseLike>'. No overload matches this call. Overload 1 of 2, '(o: {}): string[]', gave the following error. Argument of type 'TestingConfig | undefined' is not assignable to parameter of type '{}'. Type 'undefined' is not assignable to type '{}'. Overload 2 of 2, '(o: object): string[]', gave the following error. Argument of type 'TestingConfig | undefined' is not assignable to parameter of type 'object'. Type 'undefined' is not assignable to type 'object'. |
TS2790 | 15 | Error messagesThe operand of a 'delete' operator must be optional. |
TS2538 | 7 | Error messagesType 'undefined' cannot be used as an index type.Type 'null' cannot be used as an index type. |
TS2416 | 4 | Error messagesProperty 'get' in type 'Cache' is not assignable to the same property in base type 'Cache'.Type '(key: string) => Promise<string | null>' is not assignable to type '(key: string) => Promise'. Type 'Promise<string | null>' is not assignable to type 'Promise'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Property 'getMemoryStats' in type 'Cache' is not assignable to the same property in base type 'Cache'. Type '() => string | null' is not assignable to type '() => string'. Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. Property 'find' in type 'E2EElement' is not assignable to the same property in base type 'E2EElementInternal'. Type '(selector: string) => Promise<E2EElement | null>' is not assignable to type '(selector: FindSelector) => Promise'. Type 'Promise<E2EElement | null>' is not assignable to type 'Promise'. Type 'E2EElement | null' is not assignable to type 'E2EElement'. Type 'null' is not assignable to type 'E2EElement'. Property 'findAll' in type 'E2EElement' is not assignable to the same property in base type 'E2EElementInternal'. Type '(selector: string) => Promise<E2EElement[]>' is not assignable to type '(selector: FindSelector) => Promise<E2EElement[]>'. Type 'Promise<import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-element").E2EElement[]>' is not assignable to type 'Promise<import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-declarations").E2EElement[]>'. Type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-element").E2EElement[]' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-declarations").E2EElement[]'. Type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-element").E2EElement' is not assignable to type 'import("/home/runner/work/stencil/stencil/src/testing/puppeteer/puppeteer-declarations").E2EElement'. The types returned by 'find(...)' are incompatible between these types. Type 'Promise<E2EElement | null>' is not assignable to type 'Promise'. |
TS2533 | 3 | Error messagesObject is possibly 'null' or 'undefined'. |
TS2488 | 2 | Error messagesType 'Diagnostic[] | undefined' must have a 'Symbol.iterator' method that returns an iterator.Type 'string[] | undefined' must have a 'Symbol.iterator' method that returns an iterator. |
TS2684 | 1 | Error messagesThe 'this' context of type 'ResolveIdHook | undefined' is not assignable to method's 'this' of type 'Function'.Type 'undefined' is not assignable to type 'Function'. |
TS2464 | 1 | Error messagesA computed property name must be of type 'string', 'number', 'symbol', or 'any'. |
TS2430 | 1 | Error messagesInterface 'SerializeOpts' incorrectly extends interface 'SerializeCssOptions'.Types of property 'usedSelectors' are incompatible. Type 'UsedSelectors | null' is not assignable to type 'UsedSelectors | undefined'. Type 'null' is not assignable to type 'UsedSelectors | undefined'. |
TS2339 | 1 | Error messagesProperty 'kind' does not exist on type 'never'. |
TS2774 | 1 | Error messagesThis condition will always return true since this function is always defined. Did you mean to call it instead? |
Unused exports report
There are 25 unused exports on this PR. That's the same number of errors on main, so at least we're not creating new ones!
Unused exports
File | Line | Identifier |
---|---|---|
src/version.ts | 8 | transpilerId |
src/screenshot/screenshot-fs.ts | 18 | readScreenshotData |
src/utils/index.ts | 85 | XML_NS |
src/utils/index.ts | 3 | toLowerCase |
src/utils/index.ts | 84 | isDefined |
src/utils/index.ts | 85 | isUndefined |
src/utils/index.ts | 123 | ParsePackageJsonResult |
src/cli/telemetry/helpers.ts | 13 | TERMINAL_INFO |
src/compiler/app-core/app-data.ts | 3 | BUILD |
src/compiler/app-core/app-data.ts | 88 | Env |
src/compiler/app-core/app-data.ts | 90 | NAMESPACE |
src/compiler/app-core/bundle-app-core.ts | 43 | DEFAULT_CORE |
src/compiler/app-core/bundle-app-core.ts | 47 | DEFAULT_ENTRY |
src/compiler/fs-watch/fs-watch-rebuild.ts | 46 | isScriptExt |
src/compiler/fs-watch/fs-watch-rebuild.ts | 49 | isStyleExt |
src/compiler/fs-watch/fs-watch-rebuild.ts | 68 | updateCacheFromRebuild |
src/compiler/prerender/host-config.ts | 4 | generateHostConfig |
src/compiler/prerender/host-config.ts | 276 | DEFAULT_MODE |
src/compiler/style/css-imports.ts | 247 | replaceNodeModuleUrl |
src/testing/platform/testing-platform.ts | 28 | cssVarShim |
src/testing/puppeteer/puppeteer-declarations.ts | 513 | WaitForEventOptions |
src/client/polyfills/css-shim/utils.ts | 1 | GLOBAL_SCOPE |
src/compiler/config/outputs/validate-collection.ts | 16 | getCollectionDistDir |
src/compiler/sys/fetch/fetch-utils.ts | 34 | getStencilInternalDtsUrl |
src/compiler/transformers/component-native/tranform-to-native-component.ts | 13 | transformToNativeComponentText |
* @param sys the compiler system instance in use | ||
* @param duration_ms the duration of the action being tracked | ||
* @param component_count the number of components being built (optional) | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, can we add a @returns
to this JSDoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always forget that! 🤦♀️
src/cli/telemetry/telemetry.ts
Outdated
} | ||
} | ||
|
||
anonymizedConfig.outputTargets = (config.outputTargets ?? []).map((target) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anonymizing our output targets, the dev server, and the TypeScript compiler options, is there a way we could recursively apply something like ConfigStringKeys
to anything that's an object literal? I'm a bit concerned about maintaining configurations where we would have to remember the anonymize certain items as we add/change these things.
Alternatively, we could always punt on that for now. ATM, we're really only concerned with the following fields for the purposes of determining which v3 flags to set (potentially) new defaults for:
- OutputTargetHydrate#external (source)
- OutputTargetDistCustomElements#autoDefineCustomElements (source)
- OutputTargetDistCustomElements#generateTypeDeclarations (source)
We could temporarily hard code these as a temporary solution (if no recursive one is possible). In that scenario, I'd be OK with omitting the ts config and dev server config entirely for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I think the problem with the Typescript compiler options is that right now d.Config.tsCompilerOptions
has type any
, so we don't have an easy way to have type-level assurance about what props should be in there.
If you think it makes sense, and the settings we really need to look at aren't in there or in devServer
anyway I'm also fine with just removing those from the object for now.
I'll file a ticket about improving that and add a TODO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created STENCIL-469
for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if that covers all of our cases here 🤔 More immediately, we also need to consider output target fields since we're going to anonymize/serialize/deserialize those.
ATM, our output targets extend one of two base types, OutputTargetBase
or OutputTargetBaseNext
, and each output target can have multiple fields that are specific to the output target itself.
Because of the number of fields, I think we may need to walk the entire object. Otherwise, I don't know if we can cover/anonymize every string field in the output targets.
I think this would look something like:
const omitOutputTargetDetails = (outputTargetPiece: any): any => {
if (!Array.isArray(outputTargetPiece) && typeof outputTargetPiece === 'object') {
for (const [key, value] of Object.entries(outputTargetPiece)) {
if (typeof value === 'string') {
outputTargetPiece[key] = 'omitted';
} else if (Array.isArray(value)) {
outputTargetPiece[key] = 'omitted';
} else if (typeof outputTargetPiece === 'object') {
outputTargetPiece[key] = omitOutputTargetDetails(outputTargetPiece[key]);
}
}
};
and call it like so:
anonymizedConfig.outputTargets = (config.outputTargets ?? []).map((outputTarget) => omitOutputTargetDetails(outputTarget));
or something like that (this was all back of the napkin prototyping). But LMK if there's something I'm missing here (that's very possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if instead of trying to omit all of the fields on the output targets that could possibly hold identifying information, we instead opt-in to the specific fields we're interested in looking at? Something like
anonymizedConfig.outputTargets = (config.outputTargets ?? []).map((target) => {
const { external, autoDefineCustomElements, generateTypeDeclarations } = target;
return { external, autoDefineCustomElements, generateTypeDeclarations };
});
might have to do something a bit more complicated to deal with the types, but that would be the basic idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we'd want target.type
in there too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, we'd want to keep target.type
in there for sure. My vote here is for us to try to be an encompassing as possible for the output targets now. If we can find/use a generalized solution (that's not too rough on performance) we should pursue that route. Ideally I'd like us to not have to add a new key to telemetry code when we modify the shape of output targets. The reason being that in addition to having to remember/decide if the field is important enough to serialize, I think we can run into some issues with typings where a field like autoDefineCustomElements
doesn't exist on every output target.
That said, that solution isn't all too perfect either. If we go the other way and want to omit a field entirely (like the dev server), we then do have to remember to strike it from the telemetry list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so a little investigation! I implemented two different ways to recursively omit any keys in the output target objects which aren't on a 'keep' list that we define:
const OUTPUT_TARGET_KEYS_TO_KEEP = ['type', 'typesDir', 'baseUrl'];
The first is based on what you suggested:
const omitOutputTargetDetails = (outputTargetPiece: any): any => {
if (!Array.isArray(outputTargetPiece) && typeof outputTargetPiece === 'object') {
for (const [key, value] of Object.entries(outputTargetPiece)) {
if (typeof value === 'string') {
if (!OUTPUT_TARGET_KEYS_TO_KEEP.includes(key)) {
outputTargetPiece[key] = 'omitted';
}
} else if (Array.isArray(value)) {
outputTargetPiece[key] = 'omitted';
} else if (typeof outputTargetPiece === 'object') {
outputTargetPiece[key] = omitOutputTargetDetails(outputTargetPiece[key]);
}
}
}
return outputTargetPiece;
};
anonymizedConfig.outputTargets = (config.outputTargets ?? []).map(omitOutputTargetDetails);
the second uses JSON.stringify
, passing the optional 2nd argument:
anonymizedConfig.outputTargets = JSON.parse(
JSON.stringify(config.outputTargets ?? [], (key, value) => {
if (!['string', 'number'].includes(typeof value)) {
return value;
}
if (OUTPUT_TARGET_KEYS_TO_KEEP.includes(key)) {
return value;
}
return 'omitted';
})
);
I wrote a little hacky 'performance' test just to get a ballpark idea of how these perform:
it.only('test performance of OT anonymizers', () => {
const config = {
flags: {
args: [],
},
outputTargets: [
{ type: 'www', baseUrl: 'https://example.com', serviceWorker: { swDest: './tmp' } },
{ typesDir: 'foo/bar/types', type: 'dist-custom-elements' },
],
} as d.Config;
let beforeJSON = new Date();
for (let i = 0; i < 1000; i++) {
anonymizeConfigForTelemetryJSON(config);
}
let afterJSON = new Date();
// @ts-ignore
let JSONDifference = afterJSON - beforeJSON;
console.log(`JSON version took ${JSONDifference}`);
let beforenonJSON = new Date();
for (let i = 0; i < 10000; i++) {
anonymizeConfigForTelemetry(config);
}
let afternonJSON = new Date();
// @ts-ignore
let nonJSONDifference = afternonJSON - beforenonJSON;
console.log(`nonJSON version took ${nonJSONDifference}`);
});
The results were kind of surprising, but possibly make sense? I thought that the JSON.parse(JSON.stringify( ... ))
would be slower because it's basically doing some 'unnecessary' overhead work serializing and deserializing, but actually that version is quite a bit faster - anonymizing the above config 10000 times takes ~4-5ms with that version vs ~31-35ms for the recursive function call version. I suspect this is just because w/ JSON.stringify
the descent through the object is handled by native code, rather than recursive function calls, Object.entries
, etc.
So anywhoo - that's what I've found. I personally find the JSON.{stringify,parse}
version to be quite a bit more elegant, letting us just write a little function which decides what to do based on each k, v
pair (sort of a context-free way to handle it, if you will) and we don't have to include any logic for iterating, recurring, etc.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with JSON.stringify
as the implementation path here 👍 - I'd suspect that the config has to be well formed JSON (because it starts its lifecycle as an object literal/enforced by the TS compiler), and shouldn't have any circular references (although it's possible for Copy Tasks, generator functions, etc. to be shared between output targets, I don't believe/see a case where a circular ref would be created)
acbc232
to
9aea812
Compare
@rwaskiewicz ok I think comments should be addressed! |
129e79c
to
d491791
Compare
@rwaskiewicz ok so I just pushed the change to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, everything looks good from an output standpoint 👍
I had a few questions about our exclusions + a few tiny nits.
src/cli/telemetry/telemetry.ts
Outdated
/** | ||
* Anonymize the config for telemetry, replacing potentially revealing config props | ||
* Anonymize the config for telemetry, replacing potentially revealing configprops |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, was this 'configprops' change intentional in the most recent commit? I don't see any other usages of this spelling anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 not sure how that snuck in - will take it back out!
src/cli/telemetry/telemetry.ts
Outdated
baseUrl: 'omitted', | ||
})); | ||
// Anonymize the outputTargets on our configuration, taking advantage of the | ||
// optional 2nd argument to JSON.parse. If anything is not a string or number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be 'JSON.stringify'? We're only passing the return value of JSON.stringify
into JSON.parse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♀️ yes it should be haha
src/cli/telemetry/telemetry.ts
Outdated
@@ -159,8 +160,10 @@ type ConfigStringKeys = keyof { | |||
[K in keyof d.Config as Required<d.Config>[K] extends string ? K : never]: d.Config[K]; | |||
}; | |||
|
|||
const OUTPUT_TARGET_KEYS_TO_KEEP = ['type', 'typesDir', 'baseUrl']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep the 'typesDir'? Isn't it possible that folks will be providing an absolute path here? (It actually may get resolved to a full path by the compiler 🤔)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah total brain fart on my end haha
I think the props we want to keep are:
const OUTPUT_TARGET_KEYS_TO_KEEP = [
'type',
'external',
'autoDefineCustomElements',
'generateTypeDeclarations',
];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think since the latter three are booleans (or, are supposed to be booleans) we can omit those as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes sense 😅 I changed the 'keep' list to just be ["type"]
. I think external
on the 'dist-hydrate-script'
one is string[]
, so I had to add a bit of code to handle one too.
src/cli/telemetry/telemetry.ts
Outdated
// with `"omitted"`. | ||
anonymizedConfig.outputTargets = JSON.parse( | ||
JSON.stringify(config.outputTargets ?? [], (key, value) => { | ||
if (!['string', 'number'].includes(typeof value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my own understanding, why are we adding number to the list of types to anonymize? Is there something you saw that would make this expose potentially sensitive info?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see anything in particular, and I do have a bit of a hard time thinking of an example, but I just went with that to be on the safe side really. We could probably just check !(typeof value === "string")
here if we wanted to keep it simple
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My vote would be keeping it simple for now. Looking at the output target definitions, nothing jumps out at me as something that would be an issue here
@alicewriteswrongs it looks like the build is failing on this PR - can you PTAL? |
5281648
to
1d49192
Compare
@rwaskiewicz sorry for the noise, I pushed a few in-progress commits, I think it should be good now |
1d49192
to
1c34678
Compare
This adds an anonymized copy of the Stencil configuration to the telemetry object, so that various configuration options can be tracked and observed over time.
- forgot about `external`! need to make a little change to handle that differently - update tests accordingly - move the prop lists to `ReadonlyArray` variables outside the function
1c34678
to
1b08936
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! one non-blocking comment I think I can take care of in the GH UI
This adds an anonymized copy of the Stencil configuration to the
telemetry object, so that various configuration options can be tracked
and observed over time.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm test
) were run locally and passednpm run test.karma.prod
) were run locally and passednpm run prettier
) was run locally and passedPull request type
Please check the type of change your PR introduces:
What is the current behavior?
GitHub Issue Number: N/A
What is the new behavior?
This adds a function to anonymize the Stencil configuration and basically adds that anonymized object in to the object that we ship to the telemetry API endpoint.
The main thing to review here is whether the anonymization makes sense! I went through the output and removed everything I could think of that would have a filepath in it that might contain the current username, an internal URL, or something of that type.
Does this introduce a breaking change?
Testing
I have added tests around the anonymization function and updated the other unit tests for the module to account for the changes, I'm not sure if we need / want to test anything else. I've also run a dev build based on these changes locally and confirmed that the data is shipping to where it's supposed to.
Other information