Skip to content
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

tsc errors: implicitly has an 'any' type., and others #1607

Closed
1 task
erikschul opened this issue Mar 6, 2024 · 1 comment
Closed
1 task

tsc errors: implicitly has an 'any' type., and others #1607

erikschul opened this issue Mar 6, 2024 · 1 comment

Comments

@erikschul
Copy link

What version of starlight are you using?

head

What version of astro are you using?

N/A

What package manager are you using?

pnpm

What operating system are you using?

Linux

What browser are you using?

None

Describe the Bug

I created a pnpm workspace consisting of:

  • the packages/starlight folder, with the tsconfig.json from the root
  • the starlight starter project
    and updated the package.json to link it locally.

But when I open the Hero component, I get these errors.

Is it possible that you are not compiling the project with tsc and therefore don't see these errors?
Or did I misconfigure something?
Is it best practice to use any type in Astro (because strong typing is too hard?), or is this a mistake?

[{
    "resource": "/components/Hero.astro",
    "owner": "_generated_diagnostic_collection_name_#0",
    "code": "7031",
    "severity": 8,
    "message": "Binding element 'text' implicitly has an 'any' type.",
    "source": "ts",
    "startLineNumber": 53,
    "startColumn": 22,
    "endLineNumber": 53,
    "endColumn": 26
},{
    "resource": "/components/Hero.astro",
    "owner": "_generated_diagnostic_collection_name_#0",
    "code": "2322",
    "severity": 8,
    "message": "Type '{ \"set:html\": any; }' is not assignable to type 'IntrinsicAttributes & Props'.\n  Type '{ \"set:html\": any; }' is missing the following properties from type 'Props': variant, link",
    "source": "ts",
    "startLineNumber": 54,
    "startColumn": 8,
    "endLineNumber": 54,
    "endColumn": 20
}]

Link to Minimal Reproducible Example

N/A

Participation

  • I am willing to submit a pull request for this issue.
@delucis
Copy link
Member

delucis commented May 20, 2024

Hi @erikschul, thanks for your patience on this one! I just took a quick look, but I’m not able to reproduce it. Going to assume it was maybe fixed in the meantime. Feel free to provide more information if this is still causing issues.

@delucis delucis closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants