extra-parser 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,13 +27,16 @@ interface INodePatternMatch<Node extends INode<string>> {
27
27
  node: Node
28
28
  }
29
29
 
30
- type TokenPattern<Token extends IToken<string>> =
31
- (text: string) => ITokenPatternMatch<Token> | Falsy
30
+ interface ITokenPattern<Token extends IToken<string>> {
31
+ (text: string): ITokenPatternMatch<Token> | Falsy
32
+ }
32
33
 
33
- type NodePattern<
34
+ interface INodePattern<
34
35
  Token extends IToken<string>
35
36
  , Node extends INode<string>
36
- > = (tokens: Array<Token>) => INodePatternMatch<Node> | Falsy
37
+ > {
38
+ (tokens: ReadonlyArray<Token>): INodePatternMatch<Node> | Falsy
39
+ }
37
40
  ```
38
41
 
39
42
  ### tokenize
package/lib/types.d.ts CHANGED
@@ -18,5 +18,5 @@ export interface ITokenPattern<Token extends IToken<string>> {
18
18
  (text: string): ITokenPatternMatch<Token> | Falsy;
19
19
  }
20
20
  export interface INodePattern<Token extends IToken<string>, Node extends INode<string>> {
21
- (tokens: Array<Token>): INodePatternMatch<Node> | Falsy;
21
+ (tokens: ReadonlyArray<Token>): INodePatternMatch<Node> | Falsy;
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extra-parser",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "files": [