-
Notifications
You must be signed in to change notification settings - Fork 2
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
typescript definitions #1
Comments
Like in most in my libraries, I welcome contributions in this regard and then try to maintain those but I am not a TypeScript user, sometimes I need help to express those types. |
Someone, please provide typescript definitions for this package, in my opinion, this would be a very useful plugin for some startups who want their system be extensible. |
I would appreciate some help in this matter. I am not a TypeScript user nor an expert. |
Hi, |
I have been hesitating, as a matter of fact. If you wish to go full TS, why not. |
I'm working on the TS rewrite and this line bugs me. node-plug-and-play/lib/index.js Line 122 in 89a80c6
Could you please explain ? Isn't plugin.hooks[name] supposed to refer to a single hook ? How come we could map this ?
|
Not so sure about node-plug-and-play/lib/error.js Line 25 in 89a80c6
Is there any reason for not simply doing key = ... ?
I'd need some help to make the tests work as I'm not familiar at all with mocha and currently it won't run: Error: Use CoffeeScript.register() or require the coffeescript/register module to require .coffee files. |
It is always an array. the property |
This refers to the error object instance. In here, we add any property of the |
The error is related to mocha not calling the Node.js Note, I fixed the sample test, you'll have to rebase your branch. |
Replace all occurrences of |
Thank you, I'll have a look at all this, this afternoon. |
Do you mind if we replace the array_flatten method with lodash.flatten, as it is already typed ? |
I am reluctant to introduce dependencies, but there is |
Didn't know this one, thanks |
One these lines node-plug-and-play/lib/index.js Lines 141 to 143 in 1f4b16b
We use the plugin property that is added to hooks a few lines before.
2 questions:
The export interface Hook {
/**
* List of plugin names with hooks of the same name are to be executed after, a string is coerced to an array.
*/
after?: string[];
/**
* List of plugin names with hooks of the same name are to be executed before, a string is coerced to an array.
*/
before?: string[];
/**
* Name to indentify the hook.
*/
name: string;
/**
* The hook handler to be executed
*/
handler: HookHandler;
// require?: string[];
// plugin?: string;
} |
I am trying to refresh my mind but I am pretty sure you are right,
I just push a commit on master to correct line 142. |
Thanks. |
Is the call_sync function still in use ? You don't speak about it in the docs nor in your blog post. |
Then you can always declare those properties. If I remember correctly, the idea is that user-provided hooks don't need a name and required plugins but I am not even sure anymore. |
Yes, I use it in some libraries |
Hi, cool library.
Are there any plans to add typescript definitions?
Thanks.
The text was updated successfully, but these errors were encountered: