lukeed / klona

A tiny (240B to 501B) and fast utility to "deep clone" Objects, Arrays, Dates, RegExps, and more!
MIT License
1.62k stars 43 forks source link

Add types to exports map #41

Closed jakebailey closed 1 year ago

jakebailey commented 1 year ago

Without this, newer TS module resolution modes point out that there aren't types for these export mappings:

src/schema.test.ts:1:23 - error TS7016: Could not find a declaration file for module 'klona'. '/home/jabaile/work/python/pyright-action/node_modules/klona/dist/index.mjs' implicitly has an 'any' type.
  There are types at '/home/jabaile/work/python/pyright-action/node_modules/klona/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'klona' library may need to update its package.json or typings.

1 import { klona } from "klona";
lukeed commented 1 year ago

Thanks :) these should all be “index.d.ts” though

jakebailey commented 1 year ago

Ugh yes, my mistake.

jakebailey commented 1 year ago

Fixed!