acornjs / acorn-jsx

Alternative, faster React.js JSX parser
MIT License
651 stars 74 forks source link

incorrect index.d.ts ? #123

Closed Nauja closed 3 years ago

Nauja commented 3 years ago

Hello, i'm pretty sure the index.d.ts file should be:

import { Parser } from 'acorn' 

declare const jsx: (options?: jsx.AcornJSXOptions) => (BaseParser: typeof Parser) => typeof Parser;

declare namespace jsx {
- interface Options {
+ interface AcornJSXOptions {
    allowNamespacedObjects?: boolean;
    allowNamespaces?: boolean;
  }
}

export = jsx;
RReverser commented 3 years ago

Oh yeah either that, or, better yet, changing options?: jsx.AcornJSXOptions to options?: jsx.Options makes sense. Want to make a PR?