FlorianRappl / dets

Generate a single declaration file for your TypeScript project. :rocket:
https://piral.io
MIT License
24 stars 5 forks source link

reexporting a default function turns into const with type any #2

Closed SantoJambit closed 4 years ago

SantoJambit commented 4 years ago

Bug Report

Moved from Piral.

Prerequisites

Environment Details and Version

piral 0.10.9

Description

When you default export a function, then export this in a named fashion in your exports.ts file, it becomes a const with type any.

Steps to Reproduce

  1. first.ts: export default function
  2. second.ts: import default under a name
  3. second.ts: export the now named function
  4. api.ts

Expected behavior

Should export the function type

Actual behavior

Exports a const with type any.

Possible Origin / Solution

See the MWE: https://github.com/SantoJambit/shell-mwe/commit/b534b409730ba00bded5b6ee504f97b8910a2eb9

FlorianRappl commented 4 years ago

A failing (isolated) test would be appreciated. Thanks!

SantoJambit commented 4 years ago

Created a PR with a failing test