{"id":16577020,"url":"https://github.com/nvlang/svelte-bug","last_synced_at":"2025-10-29T04:32:04.712Z","repository":{"id":226689740,"uuid":"769402384","full_name":"nvlang/svelte-bug","owner":"nvlang","description":null,"archived":true,"fork":false,"pushed_at":"2024-03-09T01:35:04.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T07:14:43.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nvlang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-09T01:28:12.000Z","updated_at":"2024-07-24T00:22:38.000Z","dependencies_parsed_at":"2024-03-09T02:42:01.454Z","dependency_job_id":null,"html_url":"https://github.com/nvlang/svelte-bug","commit_stats":null,"previous_names":["nvlang/svelte-bug"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsvelte-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsvelte-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsvelte-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvlang%2Fsvelte-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvlang","download_url":"https://codeload.github.com/nvlang/svelte-bug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238768424,"owners_count":19527197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T22:09:36.718Z","updated_at":"2025-10-29T04:32:04.335Z","avatar_url":"https://github.com/nvlang.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte compiler types issue\n\n## Steps to reproduce\n\n```sh\npnpm i \u0026\u0026 tsc\n```\n\n## Expected behavior\n\nError-free compilation.\n\n## Actual behavior\n\n`tsc` prints the following to the terminal:\n\n```plain\nindex.ts:6:6 - error TS2345: Argument of type 'TemplateNode' is not assignable to parameter of type 'Node'.\n  Type 'Text' is not assignable to type 'Node'.\n    Type 'Text' is missing the following properties from type 'Property': key, value, kind, method, and 2 more.\n\n6 walk(ast.html, {\n       ~~~~~~~~\n\nindex.ts:8:13 - error TS2367: This comparison appears to be unintentional because the types '\"CatchClause\" | \"ClassBody\" | \"Identifier\" | \"Literal\" | \"MethodDefinition\" | \"PrivateIdentifier\" | \"Program\" | \"Property\" | \"PropertyDefinition\" | \"SpreadElement\" | \"Super\" | ... 59 more ... | \"VariableDeclaration\"' and '\"Text\"' have no overlap.\n\n8         if (node.type === \"Text\") {\n              ~~~~~~~~~~~~~~~~~~~~\n\nindex.ts:9:13 - error TS2532: Object is possibly 'undefined'.\n\n9             this.skip();\n              ~~~~\n\n\nFound 3 errors in the same file, starting at: index.ts:6\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvlang%2Fsvelte-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvlang%2Fsvelte-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvlang%2Fsvelte-bug/lists"}