Skip to content

Commit

Permalink
fix: ts declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
vasil-cf committed Jan 13, 2025
1 parent cff9226 commit ea8b6ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/@types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'cf-logs';
2 changes: 0 additions & 2 deletions lib/http-server/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import fastify from 'fastify';

// @ts-expect-error it's a js library
import cfLogs from 'cf-logs';

import { saveServerAddress } from '../helpers';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"scripts": {
"lint": "eslint '*/**/*.{j,t}s'",
"lint-fix": "eslint '*/**/*.{j,t}s' --fix",
"test": "node ./node_modules/mocha/bin/_mocha --require ts-node/register 'test/**/*.spec.js' --exit",
"test": "node ./node_modules/mocha/bin/_mocha --require ts-node/register './{,!(node_modules|dist)/**/}*.spec.js' --exit",
"test:ci": "yarn test",
"start": "node dist/index.js",
"version": "exit 0",
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"rootDir": "./lib", /* Specify the root folder within your source files. */
"moduleResolution": "node16", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
"paths": {
"cf-logs": ["./lib/@types"]
}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
Expand Down

0 comments on commit ea8b6ef

Please sign in to comment.