Skip to content

Commit

Permalink
fix(Parser): fix export default
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Jun 3, 2024
1 parent bb71cbe commit 4bdbfe9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

- [`AstNode.font`](https://github.com/bhsd-harry/wikiparser-node/wiki/AstNode#font), [`AstNode.bold`](https://github.com/bhsd-harry/wikiparser-node/wiki/AstNode#bold) and [`AstNode.italic`](https://github.com/bhsd-harry/wikiparser-node/wiki/AstNode#italic) for external links which have a lower precedence than apostrophes

**Changed**

- `Token.prototype.normalizeTitle` is now a private method
- [`Parser.getConfig`](ttps://github.com/bhsd-harry/wikiparser-node/wiki/Parser#getconfig) is now available for public use

## v1.9.0

*2024-05-26*
Expand Down
2 changes: 1 addition & 1 deletion base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export interface Parser {
| string
| undefined;

/** @private */
/** 获取当前的解析设置 */
getConfig(): Config;

/**
Expand Down
8 changes: 2 additions & 6 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ declare interface Parser extends ParserBase {
* @param defaultNs 命名空间
* @param include 是否嵌入
*/
normalizeTitle(
title: string,
defaultNs?: number,
include?: boolean,
config?: Config,
): Title;
normalizeTitle(title: string, defaultNs?: number, include?: boolean, config?: Config): Title;

parse(wikitext: string, include?: boolean, maxStage?: number, config?: Config): Token;

Expand Down Expand Up @@ -343,5 +338,6 @@ Object.defineProperties(Parser, def);

// @ts-expect-error mixed export styles
export = Parser;
export default Parser;
export type {Config, LintError};
export type * from './internal';

0 comments on commit 4bdbfe9

Please sign in to comment.