Skip to content

Correct types are not generated when using live collections #16688

Description

@rururux

Astro Info

Astro                    v6.3.1
Node                     v25.4.0
System                   Windows (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I found an issue when trying out the Live Collection feature using this file from the test fixtures as a reference.

The code is copied directly from the fixture so I don't think there are any mistakes (no runtime errors occur either), but the following message appears in my editor and when running astro check:

src/pages/index.astro:10:34 - error ts(2345): Argument of type 'LiveDataEntry<{ ... }>' is not assignable to parameter of type 'never'.

10 const { Content } = await render(entry);
                                    ~~~~~

Curious about this, I checked the .astro/content.d.ts file and found that the DataEntryMap type is defined as empty.

	type DataEntryMap = {
		
	};

When using content.config.ts, DataEntryMap is populated correctly, but when using live.config.ts, it appears that nothing is set.

What's the expected result?

Types are generated correctly and the "Argument of type 'LiveDataEntry ..." error above does not appear.

Link to Minimal Reproducible Example

https://github.com/rururux/astro-live-collection-type-issue-repro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P3: minor bugAn edge case that only affects very specific usage (priority)pkg: astroRelated to the core `astro` package (scope)triage: fix verifiedReporter confirmed the triage bot fix works

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions