-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change Api.AssertUser interface -> type alias (#46)
The interface causes issues with satisfying the index signature of `UnknownApiParams` (which is a `Record<string, ...>`). A type alias instead of an interface allows the index signature to work properly. See microsoft/TypeScript#15300 Bug: #45
- Loading branch information
1 parent
a5c1bd1
commit 53f80c2
Showing
4 changed files
with
16 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// https://github.com/wikimedia-gadgets/types-mediawiki/issues/45 | ||
const api = new mw.Api(); | ||
api.postWithEditToken( | ||
api.assertCurrentUser({ | ||
formatversion: "2", | ||
action: "edit", | ||
title: "Wikipedia:Sandbox", | ||
appendtext: "Test", | ||
}) | ||
); |