Skip to content

Commit 8a82bb1

Browse files
committed
Improve typescript module inferring
1 parent ba7d3cb commit 8a82bb1

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Add `markedit-api` to your (TypeScript) project's devDependencies:
1919
```json
2020
{
2121
"devDependencies": {
22-
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.10.0"
22+
"markedit-api": "https://github.com/MarkEdit-app/MarkEdit-api#v0.11.0"
2323
}
2424
}
2525
```
@@ -180,4 +180,4 @@ const editorAPI = MarkEdit.editorAPI;
180180

181181
For complete examples, refer to [Example: Markdown Table Editor](https://github.com/MarkEdit-app/MarkEdit-mte), [Example: Text Highlight](https://github.com/MarkEdit-app/MarkEdit-highlight) and [Example: Vue Language Package](https://github.com/MarkEdit-app/MarkEdit-lang-vue).
182182

183-
Also, [markedit.d.ts](./markedit.d.ts) is fully typed and documented, use it as the API reference.
183+
Also, [index.d.ts](./index.d.ts) is fully typed and documented, use it as the API reference.

index.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const MarkEdit = Object.freeze({ /* stub */ });
2+
exports.MarkEdit = MarkEdit;
File renamed without changes.

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const MarkEdit = Object.freeze({ /* stub */ });
2+
export { MarkEdit };

main.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
22
"name": "markedit-api",
3-
"version": "0.10.0",
3+
"version": "0.11.0",
44
"description": "Type definitions for the latest MakrEdit API.",
5-
"main": "main.ts",
6-
"types": "markedit.d.ts",
5+
"main": "./index.cjs",
6+
"module": "./index.js",
7+
"types": "./index.d.ts",
78
"license": "MIT",
89
"peerDependencies": {
910
"@codemirror/commands": "^6.0.0",

0 commit comments

Comments
 (0)