Skip to content

Commit

Permalink
Generating new .d.ts types file from npm run types script, updati…
Browse files Browse the repository at this point in the history
…ng `package.json` file paths
  • Loading branch information
avoidwork committed Sep 21, 2022
1 parent ef96349 commit 949dbf8
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 28 deletions.
25 changes: 25 additions & 0 deletions dist/tiny-lru.esm.d.ts
@@ -0,0 +1,25 @@
export function lru(max?: number, ttl?: number): LRU;
/**
* tiny-lru
*
* @copyright 2022 Jason Mulligan <jason.mulligan@avoidwork.com>
* @license BSD-3-Clause
* @version 9.0.0
*/
declare class LRU {
constructor(max?: number, ttl?: number);
first: any;
items: any;
last: any;
max: number;
size: number;
ttl: number;
has(key: any): boolean;
clear(): LRU;
delete(key: any): LRU;
evict(bypass?: boolean): LRU;
get(key: any): any;
keys(): string[];
set(key: any, value: any, bypass?: boolean): LRU;
}
export {};
22 changes: 21 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions package.json
Expand Up @@ -17,12 +17,12 @@
],
"license": "BSD-3-Clause",
"source": "src/lru.js",
"browser": "lib/tiny-lru.js",
"main": "lib/tiny-lru.cjs",
"module": "lib/tiny-lru.esm.js",
"browser": "dist/tiny-lru.js",
"main": "dist/tiny-lru.cjs",
"module": "dist/tiny-lru.esm.js",
"type": "module",
"sourceType": "module",
"types": "tiny-lru.d.ts",
"types": "dist/tiny-lru.esm.d.ts",
"engines": {
"node": ">=6"
},
Expand All @@ -34,16 +34,17 @@
"lint": "eslint *.js src/*.js test/*.js",
"mocha": "mocha test/*.js",
"rollup": "rollup --config",
"test": "npm run lint && npm run mocha"
"test": "npm run lint && npm run mocha",
"types": "npx -p typescript tsc dist/tiny-lru.esm.js --declaration --allowJs --emitDeclarationOnly"
},
"dependencies": {},
"devDependencies": {
"auto-changelog": "^2.4.0",
"eslint": "^8.23.1",
"mocha": "^10.0.0",
"precise": "^2.0.0",
"rollup": "^2.79.0",
"rollup-plugin-terser": "^7.0.2"
"rollup-plugin-terser": "^7.0.2",
"typescript": "^4.8.3"
},
"keywords": [
"LRU",
Expand Down
20 changes: 0 additions & 20 deletions tiny-lru.d.ts

This file was deleted.

0 comments on commit 949dbf8

Please sign in to comment.