Skip to content

Namespace members lose their signatures in DTS snapshots #31

Description

@jycouet

Given:

export namespace ns {
  export function f(a: string): void
}

the DTS snapshot renders:

export declare namespace ns {
  export { f };
}

The signature of f is dropped (and nested namespaces lose everything below the first level), so changes to namespace member signatures don't invalidate the snapshot.

Context: trying tsnapi in sveltejs/cli (sveltejs/cli#1162), where sv-utils exposes most of its API through namespaces (js.imports.addDefault, ...) - none of those signatures end up guarded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions