Skip to content

Commit

Permalink
Added type declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
mathishouis committed Feb 26, 2023
1 parent ffc582c commit dd0da59
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "buffer.ws",
"version": "1.0.6",
"version": "1.0.10",
"description": "A simple, light and fast bytebuffer implementation under node.js ",
"main": "dist/BufferWS.js",
"types": "dist/BufferWS.d.ts",
"scripts": {
"test": "mocha -r ts-node/register 'tests/**/*.ts'",
"build": "tsc"
Expand Down Expand Up @@ -41,9 +42,6 @@
"files": [
"dist/**/*"
],
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"dependencies": {
"buffer": "^6.0.3"
}
Expand Down
1 change: 1 addition & 0 deletions src/BufferWS.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module 'buffer.ws';
3 changes: 2 additions & 1 deletion src/BufferWS.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {DataView} from "./methods/DataView";
import { Buffer } from 'buffer';
import { DataView } from "./methods/DataView";

export class BufferWS {

Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"target": "es6",
"moduleResolution": "node",
"sourceMap": true,
"outDir": "./dist"
"outDir": "./dist",
"declaration": true
},
"lib": ["es2017"],
"include": ["src"],
Expand Down

0 comments on commit dd0da59

Please sign in to comment.