Skip to content

charlie-hadden/astro-icon-reproduction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproduction for astro-icon type generation

This is a reproduction for the issue described here: natemoo-re/astro-icon#126. We are only using a local collection here, and only with one icon, which is used in src/pages/index.astro.

When running astro dev, .astro/icon.d.ts gets generated like so:

declare module 'astro-icon' {
    export type Icon =
		| "test";

  }

However, if we run astro check (stopping astro dev first might make this more obvious - I'm not sure if there's a race condition otherwise), the file gets generated incorrectly:

declare module 'astro-icon' {
    export type Icon = never;

  }

And because the type gets generated as never, astro check results in an error:

src/pages/index.astro:15:11 Error: Type 'string' is not assignable to type 'never'.
14    <h1>Astro</h1>
15      <Icon name="test" />
              ~~~~
16   </body>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published