Skip to content

Commit

Permalink
Add back in 'missing types'
Browse files Browse the repository at this point in the history
  • Loading branch information
kaleidawave committed Feb 12, 2024
1 parent 3e78e0e commit 15bfa43
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,30 +267,30 @@ impl ToStringOptions {
}

// TODO temp?
// // These are here because for some reason **under debug builds** these definitions are missing.
// // It has something to do with the files as these definitions only work here :?. Experimentation needed
// #[cfg_attr(
// all(target_family = "wasm", debug_assertions),
// wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)
// )]
// const TYPES_THAT_ARE_MISSING: &str = "
// export type WithComment<T> =
// | { None: T }
// | { PrefixComment: [string, T, Span] }
// | { PostfixComment: [T, string, Span] };

// // shouldn't be useful to p need
// export type Marker<T> = null;

// export interface ClassDeclaration<T> {
// name: T,
// type_parameters?: Array<GenericTypeConstraint>,
// extends?: Expression,
// implements?: Array<TypeAnnotation>,
// members: Array<Decorated<ClassMember>>,
// position: Span,
// }
// ";
// These are here because for some reason **under debug builds** these definitions are missing.
// It has something to do with the files as these definitions only work here :?. Experimentation needed
#[cfg_attr(
all(target_family = "wasm", debug_assertions),
wasm_bindgen::prelude::wasm_bindgen(typescript_custom_section)
)]
const TYPES_THAT_ARE_MISSING: &str = "
export type WithComment<T> =
| { None: T }
| { PrefixComment: [string, T, Span] }
| { PostfixComment: [T, string, Span] };
// shouldn't be useful to p need
export type Marker<T> = null;
export interface ClassDeclaration<T> {
name: T,
type_parameters?: Array<GenericTypeConstraint>,
extends?: Expression,
implements?: Array<TypeAnnotation>,
members: Array<Decorated<ClassMember>>,
position: Span,
}
";

#[derive(Debug, Default, Clone, Copy)]
#[cfg_attr(feature = "serde-serialize", derive(serde::Deserialize))]
Expand Down

0 comments on commit 15bfa43

Please sign in to comment.