Skip to content

Commit

Permalink
feat: fix export typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
nimatrengo committed Jul 17, 2023
1 parent e709090 commit 652754c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
"name": "soft_bun",
"version": "1.2.2",
"description": "",
"main": "dist/src/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "mocha -r ts-node/register 'src/test/**/*.ts'",
"lint": "gts lint",
"clean": "gts clean",
"compile": "tsc src/index.ts --outDir ./dist",
"compile": "npx tsc --declaration --outDir ./dist",
"fix": "gts fix",
"install": "npm run compile",
"pretest": "npm run compile",
"posttest": "npm run lint",
"build": "npm run compile",
"build:watch": "tsc -w",
"dev": "npm run build && concurrently \"npm run build:watch\" \"npm run serve:watch\"",
"serve": "node ./dist/src/index.js",
"serve:watch": "nodemon ./dist/src/index.js",
"serve": "node ./dist/index.js",
"serve:watch": "nodemon ./dist/index.js",
"release": "semantic-release"
},
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare type NestedObject<T> = {
export declare type NestedObject<T> = {
[K in keyof T]: T[K] extends object ? NestedObject<T[K]> : T[K];
};
export default class State<T extends object> {
Expand Down
6 changes: 4 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
"sourceMap": true
"sourceMap": true,
"declaration": true
},
"include": ["src/**/*.ts", "src/test/**/*.spec.ts"]
"include": ["src/**/*.ts", "src/test/**/*.spec.ts"],
"exclude": ["node_modules"]
}

0 comments on commit 652754c

Please sign in to comment.