Documentation: mention that you will need a shim so tsc doesn't complain

Open Beginner friendly
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
70/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript
Domain
documentation

Research direction

Use the issue's src/shims-md.d.ts example as the reference for the documentation change. Find the project's existing documentation entry point and explain that TypeScript Vue users importing .md files need an ambient module declaration; done means the shim and its purpose are documented clearly.

Written by the indexing model from the issue text.

Description

If you're writing typescript Vue code, tsc will complain when you do import Doc from 'Doc.md'. You need to add a shim (ambient typescript module declaration) to tell tsc that a .md is a Vue component:

% cat src/shims-md.d.ts
declare module '*.md' {
  import Vue from 'vue'
  export default Vue
}

Otherwise when building, you will get errors about missing components.

Dominant language
JavaScript
Stars
24
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from egoist/vmark-loader

All issues in egoist/vmark-loader

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.