Skip to content

Commit

Permalink
feat: export TokenTypes and AST
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Aug 17, 2024
1 parent e840a91 commit b85ba3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export interface LintError {
export type AST = Record<string, string | number | boolean> & {
range: [number, number];
type?: TokenTypes;
name?: string;
childNodes?: AST[];
};

Expand Down
2 changes: 2 additions & 0 deletions extensions/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type {editor} from 'monaco-editor';
import type {CodeJar as CodeJarAsync} from 'codejar-async';
import type {Config, LintError, AST} from '../base';

export type {AST};

export interface PrinterBase {
include: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
classes,
} from './util/constants';
import {tidy} from './util/string';
import type {Config, LintError, Parser as ParserBase} from './base';
import type {Config, LintError, TokenTypes, Parser as ParserBase} from './base';
import type {Title} from './lib/title';
import type {Token} from './internal';

Expand Down Expand Up @@ -426,5 +426,5 @@ Object.defineProperties(Parser, def);
// @ts-expect-error mixed export styles
export = Parser;
export default Parser;
export type {Config, LintError};
export type {Config, LintError, TokenTypes};
export type * from './internal';

0 comments on commit b85ba3d

Please sign in to comment.