zerthox / betterdiscord-types Goto Github PK
View Code? Open in Web Editor NEWType definitions for BetterDiscord.
Home Page: https://docs.betterdiscord.app/api/
License: MIT License
Type definitions for BetterDiscord.
Home Page: https://docs.betterdiscord.app/api/
License: MIT License
This expression is not callable.
Type '{ default: (...args: ArgumentArray) => string; }' has no call signatures. ts(2349)
utils.d.ts(1, 1): Type originates at this import.
A namespace-style import cannot be called or constructed,
and will cause a failure at runtime.
Consider using a default import or import require here instead.
The definition type is incorrect.
// use
import classNames from "classnames";
// instead of
import * as classNames from "classnames";
The Patcher methods on a bound instance of BdApi lose their proper typings, likely because the Bound
type used to create the bound patcher doesn't retain the methods' generics.
With BdApi.Patcher.after
:
With new BdApi("Caller").Patcher.after
and the same arguments passed without the caller:
I've been playing around with trying to find some solutions, but the only thing that's worked so far is just redefining the patcher without the caller
argument in its methods. There might be a more creative solution, but I haven't been able to find one.
Patching a context menu like shown below results in an error, as the ContextMenuCallback type cannot have a props
argument, even though I believe the props are passed to the patch callback.
BdApi.ContextMenu.patch("guild-context", (ret, props) => {
console.log(props);
});
BdApi.Data
is currently typed to be opaque to the user. The user could be allowed to optionally supply a type parameter to Data
(and BdApi
& BoundBdApi
), which would be used to type accesses via save
, load
and delete
.
Add types for BetterDiscord's new (beta) Net API.
Hi, I'm having an issue with the DOM.addStyle
and DOM.removeStyle
methods, for some reason they expect 1 argument less than they should?
src/index.tsx:15:37 - error TS2554: Expected 1 arguments, but got 2.
15 this.bdApi.DOM.addStyle('test', `random css`);
~~~~~~~~~~~~
src/index.tsx:20:32 - error TS2554: Expected 0 arguments, but got 1.
20 this.bdApi.DOM.removeStyle('test');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.