refactor: rename build typings dir to types

This commit is contained in:
Tianyi Cui
2026-06-20 00:26:02 +08:00
parent ed94daed9e
commit 7f131dd4d8
65 changed files with 166 additions and 166 deletions

View File

@@ -5,10 +5,10 @@
"private": true,
"type": "module",
"main": "lib/index.js",
"types": "lib/typings/shared.d.ts",
"types": "lib/types/shared.d.ts",
"exports": {
".": {
"types": "./lib/typings/shared.d.ts",
"types": "./lib/types/shared.d.ts",
"node": "./lib/index.js",
"default": "./lib/browser.js"
},
@@ -18,8 +18,8 @@
"files": [
"lib/index.js",
"lib/browser.js",
"lib/typings/**/*.d.ts",
"lib/typings/**/*.d.ts.map",
"lib/types/**/*.d.ts",
"lib/types/**/*.d.ts.map",
"src"
],
"author": "Shigma <shigma10826@gmail.com>",

View File

@@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib/typings",
"outDir": "lib/types",
"noUncheckedIndexedAccess": false,
"exactOptionalPropertyTypes": false,
"noImplicitOverride": false,

View File

@@ -3,7 +3,7 @@ import { defineConfig } from 'tsdown'
/**
* logger-console ships two entries: the node exporter (index) and the
* browser exporter (browser), selected via package.json `exports`
* conditions. The entries are JS emitted by tsc under lib/typings and are
* conditions. The entries are JS emitted by tsc under lib/types and are
* bundled as two single-entry passes so the shared base class is inlined into
* each (matching upstream's published shape) instead of split into a hash-named
* chunk.
@@ -19,6 +19,6 @@ const shared = {
} as const
export default defineConfig([
{ ...shared, entry: ['lib/typings/index.js'] },
{ ...shared, entry: ['lib/typings/browser.js'] },
{ ...shared, entry: ['lib/types/index.js'] },
{ ...shared, entry: ['lib/types/browser.js'] },
])