Skip to content

Add exports.*.types instead of @ts-self-types #977

@ai

Description

@ai

As I understand for JS files needs Deno a way to find .d.ts types without scanning file system. Right now we are using comments like /* @ts-self-types="./index.d.ts" */.

Adding these comments doesn’t look beautiful for me and for esthetic reasons I prefer to have something like:

{
  "name": "@sitnik/nanoid",
  "version": "5.1.0",
  "license": "MIT",
  "exports": {
    ".": {
      "types": "./index.d.ts",
      "default": "./index.js"
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions