-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
types for atom/tool-bar #43727
types for atom/tool-bar #43727
Conversation
@aminya Thank you for submitting this PR! 🔔 @GlenCFL @smhxx @lierdakil - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
Something minor: I thought |
I'm a little torn on this one. On the one hand, tool-bar is a third-party package, and neither myself, nor, to my knowledge @GlenCFL or @smhxx are using it anywhere, so maintainers won't be able to actually maintain definitions for it in any meaningful sense. On the other hand, saying "it's a third-party package so we can't maintain it" isn't right either, since we do have definitions for In general, I would suggest making a separate package for this, but the definition probably references stuff from base atom definitions, which would make this approach more than a little unwieldy. @aminya -- perhaps the solution here is to add yourself to maintainers for the atom type definitions. |
How can I add myself as a maintainer? That's totally fine to me. |
My intent in adding the type definitions for third-party packages was always for @aminya You'd just add yourself to the list at the top of the Atom definition file. |
Thank you! I will do it.
ToolBarManager is a valid class in tool-bar: https://github.com/suda/tool-bar/blob/0b8a1ced016b852ed175f72d7a860b324ef438fd/lib/tool-bar-manager.js#L4 |
We're defining a module, import { ToolBarManager } from "atom/tool-bar";
const toolbar = new ToolBarManager(); That's a runtime error introduced through the definition file. |
The primary difference between declare class SomeRandomClass {
constructor();
}
const newClass = new SomeRandomClass(); but the produced javascript will break, because constructor for As far as I can tell, it's completely impossible to get at the constructor for Does this make sense? |
Yes! Thank you all. I will change it to interface! |
- full tooltip options typings - types for ToolBarButtonView - types for ToolBarSpacerView - 14 px config option - Renamed getToolbarCallback to getToolBarManager
I updated the types. Could you approve this? |
A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
@GlenCFL, @lierdakil, @aminya I didn't quite follow the conversation, is this good to merge? |
Yes. I updated the types and GlenCFL already approved it. |
I just published |
https://github.com/suda/tool-bar
See this in action here: https://github.com/aminya/juno-plus/blob/78c1ee36c83cc4f9371d7dafd0498b3ccec76aa1/src/juno-plus.ts#L1
Please fill in this template.
npm test
.)npm run lint package-name
(ortsc
if notslint.json
is present).Select one of these and delete the others:
If adding a new definition:
.d.ts
files generated via--declaration
If changing an existing definition: