Merge pull request #961 from jonhue/fix-precedence-typings

Fix precedence typings
This commit is contained in:
Max Brunsfeld 2021-03-02 11:09:16 -08:00 committed by GitHub
commit 24d0a6a817
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
cli/npm/dsl.d.ts vendored
View file

@ -72,7 +72,7 @@ interface Grammar<
* a *descending* ordering. Names listed earlier in one of these arrays
* have higher precedence than any names listed later in the same array.
*/
precedences: () => String[][],
precedences?: () => String[][],
/**
* An array of arrays of rule names. Each inner array represents a set of
@ -233,7 +233,7 @@ declare function optional(rule: RuleOrLiteral): ChoiceRule;
* @see https://docs.oracle.com/cd/E19504-01/802-5880/6i9k05dh3/index.html
*/
declare const prec: {
(string: String | number, rule: RuleOrLiteral): PrecRule;
(value: String | number, rule: RuleOrLiteral): PrecRule;
/**
* Marks the given rule as left-associative (and optionally applies a