nuxt-modules / nuxt-modules/prismic

Auto-Import the generated Document types in 'prismicio-types.d.ts'

Open
#240 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
249
Forks
44
Avg merge
16m
Merged PRs (30d)
1

Description

Maybe i am missing something but how can these types be auto imported in nuxt?

This feels wrong....

imports: {
    presets: [
      {
        from: '~~/prismicio-types',
        imports: [
          { name: 'ArticleDocument', type: true },
          { name: 'AuthorDocument', type: true },
          { name: 'CategoryDocument', type: true }
        ]
      }
    ]
  },

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Nuxt imports configuration shown in the issue and the generated prismicio-types.d.ts file. Determine how the generated ArticleDocument, AuthorDocument, and CategoryDocument types could be made available without the manual imports; done means those types can be used automatically in Nuxt.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxt, typescript
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.