-
Notifications
You must be signed in to change notification settings - Fork 137
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
Change typings #198
Change typings #198
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! Just a few questions to ensure all use-cases of jsep can be supported. Happy Hactoberfest!
@@ -1,161 +1,173 @@ | |||
declare module 'jsep' { | |||
|
|||
namespace jsep { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the namespace can it still support the various ways that jsep is used?
import jsep from 'jsep'
import * as jsep from 'jsep'
const jsep = require('jsep')
const { Jsep } = require('jsep')
(this PR adds types for the class, which is great!)
register: (...plugins: IPlugin[]) => void; | ||
} | ||
|
||
export class Jsep { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to add this class export for const { Jsep } = require('jsep')
... but can it be combined to support const jsep = require('jsep')
and import jsep from 'jsep'
and import * as jsep from jsep
?
public static removeLiteral(literalName: string): Jsep; | ||
public static removeAllLiterals(): Jsep; | ||
|
||
public get char(): string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these getters are useful for the hooks (which is why they're defined in the HookScope
), but not sure they need to be here for public use?
Closed as abandoned & stale |
Happy hacktoberfest! Was just passing by using this library in a project, but we found it useless for our needs. By while I was researching it, I found out that some types was not present. So I've added them!