Skip to content

6.0.0: Exporting types from this package does not work anymore #407

@garyking

Description

@garyking

Bug description

I have an NPM module called notes-app that imports this module (@doist/todoist-api-typescript).

I export all types from @doist/todoist-api-typescript from within notes-app, like let's say export type { Task } from '@doist/todoist-api-typescript';.

I then import this from another NPM module (let's say test-app), like import { Task } from 'notes-app';.

This used to work fine, and I could access the Task type and all its properties from test-app just fine. But since 6.0.0, I can't.

This bug was likely introduced in #379.

Expected behaviour

Should be able to access all properties of Task in test-app.

Is reproducible

Yes

Version information:

  • Package version: 6.0.0

tsconfig.json for notes-app project

{
  "compilerOptions": {
    "baseUrl": ".",
    "declaration": true,
    "declarationMap": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "preserve",
    "module": "CommonJS",
    "noEmit": false,
    "outDir": "./dist/",
    "paths": {
      "*": ["types/*", "node_modules/ts-types/src/types/*"]
    },
    "resolveJsonModule": true,
    "rootDir": "./src/",
    "skipLibCheck": true,
    "sourceMap": true,
    "strict": true,
    "target": "ES6"
  },
  "include": ["src"],
  "exclude": [
    "**/build/**",
    "**/coverage/**",
    "**/dist/**",
    "**/node_modules/**"
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions