Skip to content

Commit

Permalink
Add TypeScript typings
Browse files Browse the repository at this point in the history
So that users importing it in TypeScript don’t get an error like this:

> Could not find a declaration file for module '@ably/vcdiff-decoder'. '/Users/lawrence/code/work/ably/ably-js/node_modules/@ably/vcdiff-decoder/lib/vcdiff_decoder.js' implicitly has an 'any' type.
  • Loading branch information
lawrence-forooghian committed Nov 20, 2023
1 parent 53f940f commit fce3421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"license": "Apache-2.0",
"homepage": "https://ably.io/",
"main": "lib/vcdiff_decoder.js",
"typings": "typings.d.ts",
"scripts": {
"grunt": "grunt",
"test": "grunt test:all"
Expand All @@ -28,7 +29,8 @@
},
"files": [
"lib",
"dist"
"dist",
"typings.d.ts"
],
"devDependencies": {
"@babel/core": "^7.9.0",
Expand Down
1 change: 1 addition & 0 deletions typings.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export declare function decode(delta: Uint8Array, source: Uint8Array): Uint8Array;

0 comments on commit fce3421

Please sign in to comment.