Skip to content

Commit ea8b6ef

Browse files
committed
fix: ts declarations
1 parent cff9226 commit ea8b6ef

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

lib/@types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module 'cf-logs';

lib/http-server/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import fastify from 'fastify';
2-
3-
// @ts-expect-error it's a js library
42
import cfLogs from 'cf-logs';
53

64
import { saveServerAddress } from '../helpers';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"scripts": {
5050
"lint": "eslint '*/**/*.{j,t}s'",
5151
"lint-fix": "eslint '*/**/*.{j,t}s' --fix",
52-
"test": "node ./node_modules/mocha/bin/_mocha --require ts-node/register 'test/**/*.spec.js' --exit",
52+
"test": "node ./node_modules/mocha/bin/_mocha --require ts-node/register './{,!(node_modules|dist)/**/}*.spec.js' --exit",
5353
"test:ci": "yarn test",
5454
"start": "node dist/index.js",
5555
"version": "exit 0",

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"rootDir": "./lib", /* Specify the root folder within your source files. */
3030
"moduleResolution": "node16", /* Specify how TypeScript looks up a file from a given module specifier. */
3131
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
32+
"paths": {
33+
"cf-logs": ["./lib/@types"]
34+
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
3335
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
3436
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
3537
// "types": [], /* Specify type package names to be included without being referenced in a source file. */

0 commit comments

Comments
 (0)