Skip to content

Commit a7ff967

Browse files
committed
fix GetLoc type
1 parent 60a6aea commit a7ff967

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/oxlint/src-js/generated/deserialize.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/raw_transfer.rs`.
33

44
import type { Program } from "./types.d.ts";
5-
import type { NodeOrToken } from "../plugins/types.ts";
5+
import type { Node, Comment } from "../plugins/types.ts";
66
import type { Location as SourceLocation } from "../plugins/location.ts";
77

88
type BufferWithArrays = Uint8Array & { uint32: Uint32Array; float64: Float64Array };
9-
type GetLoc = (node: NodeOrToken) => SourceLocation;
9+
type GetLoc = (node: Node | Comment) => SourceLocation;
1010

1111
export declare function deserializeProgramOnly(
1212
buffer: BufferWithArrays,

tasks/ast_tools/src/generators/raw_transfer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ fn generate_deserializers(
208208
#[rustfmt::skip]
209209
let code_type_definition_linter = "
210210
import type { Program } from './types.d.ts';
211-
import type { NodeOrToken } from '../plugins/types.ts';
211+
import type { Node, Comment } from '../plugins/types.ts';
212212
import type { Location as SourceLocation } from '../plugins/location.ts';
213213
214214
type BufferWithArrays = Uint8Array & { uint32: Uint32Array; float64: Float64Array };
215-
type GetLoc = (node: NodeOrToken) => SourceLocation;
215+
type GetLoc = (node: Node | Comment) => SourceLocation;
216216
217217
export declare function deserializeProgramOnly(
218218
buffer: BufferWithArrays,

0 commit comments

Comments
 (0)