Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Change typings #198

wants to merge 1 commit into from

Conversation

Andreybest
Copy link

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!

Copy link
Collaborator

@6utt3rfly 6utt3rfly left a 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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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;
Copy link
Collaborator

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?

@6utt3rfly
Copy link
Collaborator

Closed as abandoned & stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants