Skip to content

Commit

Permalink
Add TypeScript typings (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
yassernasc authored Dec 17, 2024
1 parent cbbb9d5 commit c3a41c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare class Realm {
evaluate(code: string, opts?: { filename: string; offset: number }): any

destroy(): void
}

export = Realm
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@
"version": "1.0.7",
"description": "Realm support for Bare",
"exports": {
".": "./index.js",
".": {
"types": "./index.d.ts",
"default": "./index.js"
},
"./package": "./package.json",
"./errors": "./lib/errors.js"
},
"files": [
"index.js",
"index.d.ts",
"binding.c",
"binding.js",
"CMakeLists.txt",
Expand Down

0 comments on commit c3a41c1

Please sign in to comment.