Skip to content

Commit eb4ce21

Browse files
authored
fix: fix sourcemaps and circular dependencies (#2929)
1 parent 5e67cdf commit eb4ce21

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

Diff for: src/MarkedOptions.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Token, Tokens, TokensList } from './Tokens.ts';
2-
import { _Parser } from './Parser.ts';
3-
import { _Lexer } from './Lexer.ts';
4-
import { _Renderer } from './Renderer.ts';
5-
import { _Tokenizer } from './Tokenizer.ts';
2+
import type { _Parser } from './Parser.ts';
3+
import type { _Lexer } from './Lexer.ts';
4+
import type { _Renderer } from './Renderer.ts';
5+
import type { _Tokenizer } from './Tokenizer.ts';
66

77
export interface SluggerOptions {
88
/** Generates the next unique slug without updating the internal accumulator. */

Diff for: src/Renderer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
escape
55
} from './helpers.ts';
66
import type { MarkedOptions } from './MarkedOptions.ts';
7-
import { Slugger } from './marked.ts';
7+
import type { _Slugger } from './Slugger.ts';
88

99
/**
1010
* Renderer
@@ -49,7 +49,7 @@ export class _Renderer {
4949
return html;
5050
}
5151

52-
heading(text: string, level: number, raw: string, slugger: Slugger): string {
52+
heading(text: string, level: number, raw: string, slugger: _Slugger): string {
5353
if (this.options.headerIds) {
5454
const id = this.options.headerPrefix + slugger.slug(raw);
5555
return `<h${level} id="${id}">${text}</h${level}>\n`;

Diff for: src/Tokenizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
escape,
66
findClosingBracket
77
} from './helpers.ts';
8-
import { _Lexer } from './Lexer.ts';
8+
import type { _Lexer } from './Lexer.ts';
99
import type { Links, Tokens } from './Tokens.ts';
1010
import type { MarkedOptions } from './MarkedOptions.ts';
1111

Diff for: tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"allowSyntheticDefaultImports": true,
1010
"moduleResolution": "NodeNext",
1111
"noImplicitAny": false,
12-
"allowImportingTsExtensions": true
12+
"allowImportingTsExtensions": true,
13+
"sourceMap": false
1314
},
1415
"include": [
1516
"src/*.ts"

0 commit comments

Comments
 (0)