Skip to content

Commit

Permalink
Add TS declaration for npm
Browse files Browse the repository at this point in the history
  • Loading branch information
diskdance committed Dec 6, 2024
1 parent 976d9f4 commit 1717868
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.EN.MD
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ mw.loader.load( 'https://another.wiki/w/index.php?title=MediaWiki:Gadget-HanAssi
// mw.libs.HanAssist.convByVar( ... );
```

Since this gadget is mainly for Chinese users, most of its documentation is written in Chinese. For building instructions, see [CONTRIBUTING.MD](./CONTRIBUTING.MD). For TypeScript definitions, see [typings.d.ts](./typings.d.ts).
Since this gadget is mainly for Chinese users, most of its documentation is written in Chinese. For building instructions, see [CONTRIBUTING.MD](./CONTRIBUTING.MD). There is a TypeScript type definition at [typings.d.ts](./typings.d.ts) specially for MediaWiki frontend development.
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HanAssist ![Lint](https://github.com/diskdance/HanAssist/actions/workflows/lint.yml/badge.svg) ![Test status](https://github.com/diskdance/HanAssist/actions/workflows/test.yml/badge.svg)
# HanAssist ![Lint](https://github.com/wikimedia-gadgets/HanAssist/actions/workflows/lint.yml/badge.svg) ![Test status](https://github.com/wikimedia-gadgets/HanAssist/actions/workflows/test.yml/badge.svg)
[English](./README.EN.MD)

HanAssist 是帮助中文维基百科及其他 MediaWiki 网站上的用户脚本和小工具更优雅地处理中文变体消息的实用程序。
Expand Down Expand Up @@ -142,7 +142,7 @@ mw.msg( 'SearchHint', 'Apple' ); // => 界面语言为简中:“搜索包含Ap
```

### 使用类型定义文件
本小工具[提供了类型定义文件](./typings.d.ts)将其中的内容复制到您的项目中即可使用
本小工具[提供了类型定义文件](./typings.d.ts)将其中的内容复制到您的 MediaWiki 项目中即可使用

## 局限
在软件领域,[没有银弹](https://zh.wikipedia.org/wiki/%E6%B2%A1%E6%9C%89%E9%93%B6%E5%BC%B9),因此 HanAssist 也并非完美。在一些使用场景下,您应该使用其他更合适的工具而非 HanAssist。
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hanassist",
"version": "4.2.2",
"version": "4.2.3",
"description": "A MediaWiki gadget to ease Chinese variant handling in user scripts and gadgets.",
"repository": "github:diskdance/HanAssist",
"author": "diskdance",
Expand Down Expand Up @@ -40,4 +40,4 @@
"jsdom": "^20.0.0",
"tslib": "^2.6.2"
}
}
}
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
"composite": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node"
"moduleResolution": "node",
"declaration": true
},
"include": [
"lib/**/*.ts"
],
"exclude": []
}
}

0 comments on commit 1717868

Please sign in to comment.