Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/oxc_napi/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use napi_derive::napi;

use oxc_diagnostics::{LabeledSpan, NamedSource, OxcDiagnostic};

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct OxcError {
pub severity: Severity,
pub message: String,
Expand Down Expand Up @@ -64,7 +64,7 @@ impl From<&OxcDiagnostic> for OxcError {
}
}

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct ErrorLabel {
pub message: Option<String>,
pub start: u32,
Expand Down
6 changes: 3 additions & 3 deletions napi/minify/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export interface Comment {
}

export interface ErrorLabel {
message?: string
message: string | null
start: number
end: number
}
Expand All @@ -200,8 +200,8 @@ export interface OxcError {
severity: Severity
message: string
labels: Array<ErrorLabel>
helpMessage?: string
codeframe?: string
helpMessage: string | null
codeframe: string | null
}

export declare const enum Severity {
Expand Down
32 changes: 16 additions & 16 deletions napi/parser/src-js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface Comment {
}

export interface ErrorLabel {
message?: string
message: string | null
start: number
end: number
}
Expand All @@ -31,8 +31,8 @@ export interface OxcError {
severity: Severity
message: string
labels: Array<ErrorLabel>
helpMessage?: string
codeframe?: string
helpMessage: string | null
codeframe: string | null
}

export declare const enum Severity {
Expand Down Expand Up @@ -74,9 +74,9 @@ export interface EcmaScriptModule {

export interface ExportExportName {
kind: ExportExportNameKind
name?: string
start?: number
end?: number
name: string | null
start: number | null
end: number | null
}

export declare const enum ExportExportNameKind {
Expand All @@ -90,9 +90,9 @@ export declare const enum ExportExportNameKind {

export interface ExportImportName {
kind: ExportImportNameKind
name?: string
start?: number
end?: number
name: string | null
start: number | null
end: number | null
}

export declare const enum ExportImportNameKind {
Expand All @@ -108,9 +108,9 @@ export declare const enum ExportImportNameKind {

export interface ExportLocalName {
kind: ExportLocalNameKind
name?: string
start?: number
end?: number
name: string | null
start: number | null
end: number | null
}

export declare const enum ExportLocalNameKind {
Expand All @@ -127,9 +127,9 @@ export declare const enum ExportLocalNameKind {

export interface ImportName {
kind: ImportNameKind
name?: string
start?: number
end?: number
name: string | null
start: number | null
end: number | null
}

export declare const enum ImportNameKind {
Expand Down Expand Up @@ -229,7 +229,7 @@ export interface StaticExportEntry {
* ```
*/
isType: boolean
moduleRequest?: ValueSpan
moduleRequest: ValueSpan | null
}

export interface StaticImport {
Expand Down
10 changes: 5 additions & 5 deletions napi/parser/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ pub enum ImportNameKind {
Default,
}

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct ImportName {
pub kind: ImportNameKind,
pub name: Option<String>,
pub start: Option<u32>,
pub end: Option<u32>,
}

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct StaticExportEntry {
pub start: u32,
pub end: u32,
Expand Down Expand Up @@ -222,7 +222,7 @@ pub enum ExportImportNameKind {
None,
}

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct ExportImportName {
pub kind: ExportImportNameKind,
pub name: Option<String>,
Expand All @@ -240,15 +240,15 @@ pub enum ExportExportNameKind {
None,
}

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct ExportExportName {
pub kind: ExportExportNameKind,
pub name: Option<String>,
pub start: Option<u32>,
pub end: Option<u32>,
}

#[napi(object)]
#[napi(object, use_nullable = true)]
pub struct ExportLocalName {
pub kind: ExportLocalNameKind,
pub name: Option<String>,
Expand Down
Loading
Loading