Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • H html-validate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • html-validate
  • html-validate
  • Issues
  • #127
Closed
Open
Created Jul 11, 2021 by David Sveningsson@extsidvindOwner

Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

In the 5.1.0 release the core.d.ts files are corrupted and causes this error when used:

dist/cjs/core.d.ts(1893,1): error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

The error happens because the original source line

export { version } from "../package.json";

is turned into

const version = "5.1.0";

by the json rollup plugin. This is fine for the regular build but for the typescript declaration it should be

declare const version: string;
Assignee
Assign to
Time tracking