Skip to content

Commit

Permalink
docs: improve the description in README.md
Browse files Browse the repository at this point in the history
check other authors/commits at wikimedia-gadgets#33
  • Loading branch information
AnYiEE committed Jan 19, 2024
1 parent b582f5d commit 33d4e81
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[![NPM version](https://img.shields.io/npm/v/types-mediawiki-renovate.svg)](https://www.npmjs.com/package/types-mediawiki-renovate)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

# types-mediawiki-renovate

TypeScript definitions for MediaWiki JS interface.

This package covers the functions and classes in the `mw` global object, as well a few jQuery plugins used in MediaWiki core. All commonly used parts of the interface are covered but as far as complete coverage is concerned, this is a work in progress.
This package covers the functions and classes in the `mw` global object, as well some jQuery plugins used in MediaWiki core. All commonly used parts of the interface are covered.

[`@types/jquery`](https://www.npmjs.com/package/@types/jquery) and [`@types/oojs-ui`](https://www.npmjs.com/package/@types/oojs-ui) from [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) are included as dependencies, so you don't need to install them separately.

[![Download stats](https://nodei.co/npm/types-mediawiki-renovate.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/types-mediawiki-renovate)

Expand All @@ -24,7 +27,7 @@ Edit your project's `tsconfig.json` file so that it includes
]
```

You should be all set! `mw` will be available in the global scope. There is no need to put any import statements in the TypeScript source files. This package includes [@types/jquery](https://www.npmjs.com/package/@types/jquery) as a dependency, so you don't need to install that separately.
You should be all set! `mw` will be available in the global scope. There is no need to put any import statements in the TypeScript source files.

**If you find any errors or have suggestions for more specific typings, please open a PR or file an issue.**

Expand Down Expand Up @@ -66,13 +69,7 @@ import type {ApiEditPageParams, ApiParseParams} from 'types-mediawiki/api_params

Since it is just a type import, it doesn't generate any JavaScript. Hence, such imports can also be used in non-modular applications.

## Types for OOjs & OOUI

TypeScript definitions of OOjs and OOUI is available on [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) and npm as [`@types/oojs`](https://www.npmjs.com/package/@types/oojs) and [`@types/oojs-ui`](https://www.npmjs.com/package/@types/oojs-ui) packages.

## TODO

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

- Add doc comments for `mw.ForeignUpload`, `mw.ForeignStructuredUpload`, `mw.GallerySlideshow`, `mw.special.ApiSandbox`, `mw.Upload` and `mw.jqueryMsg` private methods.
- Add types for more jQuery plugins.

0 comments on commit 33d4e81

Please sign in to comment.