// Code generated by tools/gen-rust-ast; DO NOT EDIT.

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct SymbolFlags(pub u32);

impl SymbolFlags {
    pub const NONE: Self = Self(0);
    pub const FUNCTION_SCOPED_VARIABLE: Self = Self(1);
    pub const BLOCK_SCOPED_VARIABLE: Self = Self(2);
    pub const PROPERTY: Self = Self(4);
    pub const ENUM_MEMBER: Self = Self(8);
    pub const FUNCTION: Self = Self(16);
    pub const CLASS: Self = Self(32);
    pub const INTERFACE: Self = Self(64);
    pub const CONST_ENUM: Self = Self(128);
    pub const REGULAR_ENUM: Self = Self(256);
    pub const VALUE_MODULE: Self = Self(512);
    pub const NAMESPACE_MODULE: Self = Self(1024);
    pub const TYPE_LITERAL: Self = Self(2048);
    pub const OBJECT_LITERAL: Self = Self(4096);
    pub const METHOD: Self = Self(8192);
    pub const CONSTRUCTOR: Self = Self(16384);
    pub const GET_ACCESSOR: Self = Self(32768);
    pub const SET_ACCESSOR: Self = Self(65536);
    pub const SIGNATURE: Self = Self(131072);
    pub const TYPE_PARAMETER: Self = Self(262144);
    pub const TYPE_ALIAS: Self = Self(524288);
    pub const EXPORT_VALUE: Self = Self(1048576);
    pub const ALIAS: Self = Self(2097152);
    pub const PROTOTYPE: Self = Self(4194304);
    pub const EXPORT_STAR: Self = Self(8388608);
    pub const OPTIONAL: Self = Self(16777216);
    pub const TRANSIENT: Self = Self(33554432);
    pub const ASSIGNMENT: Self = Self(67108864);
    pub const MODULE_EXPORTS: Self = Self(134217728);
    pub const CONST_ENUM_ONLY_MODULE: Self = Self(268435456);
    pub const REPLACEABLE_BY_METHOD: Self = Self(536870912);
    pub const GLOBAL_LOOKUP: Self = Self(1073741824);
    pub const ALL: Self = Self(1073741823);
    pub const ENUM: Self = Self(384);
    pub const VARIABLE: Self = Self(3);
    pub const VALUE: Self = Self(111551);
    pub const TYPE: Self = Self(788968);
    pub const NAMESPACE: Self = Self(1920);
    pub const MODULE: Self = Self(1536);
    pub const ACCESSOR: Self = Self(98304);
    pub const FUNCTION_SCOPED_VARIABLE_EXCLUDES: Self = Self(111550);
    pub const BLOCK_SCOPED_VARIABLE_EXCLUDES: Self = Self(111551);
    pub const PARAMETER_EXCLUDES: Self = Self(111551);
    pub const PROPERTY_EXCLUDES: Self = Self(111547);
    pub const ENUM_MEMBER_EXCLUDES: Self = Self(900095);
    pub const FUNCTION_EXCLUDES: Self = Self(110991);
    pub const CLASS_EXCLUDES: Self = Self(899503);
    pub const INTERFACE_EXCLUDES: Self = Self(788872);
    pub const REGULAR_ENUM_EXCLUDES: Self = Self(899327);
    pub const CONST_ENUM_EXCLUDES: Self = Self(899967);
    pub const VALUE_MODULE_EXCLUDES: Self = Self(110735);
    pub const NAMESPACE_MODULE_EXCLUDES: Self = Self(0);
    pub const METHOD_EXCLUDES: Self = Self(103359);
    pub const GET_ACCESSOR_EXCLUDES: Self = Self(46015);
    pub const SET_ACCESSOR_EXCLUDES: Self = Self(78783);
    pub const ACCESSOR_EXCLUDES: Self = Self(111551);
    pub const TYPE_PARAMETER_EXCLUDES: Self = Self(526824);
    pub const TYPE_ALIAS_EXCLUDES: Self = Self(788968);
    pub const ALIAS_EXCLUDES: Self = Self(2097152);
    pub const MODULE_MEMBER: Self = Self(2623475);
    pub const EXPORT_HAS_LOCAL: Self = Self(944);
    pub const BLOCK_SCOPED: Self = Self(418);
    pub const PROPERTY_OR_ACCESSOR: Self = Self(98308);
    pub const CLASS_MEMBER: Self = Self(106500);
    pub const EXPORT_SUPPORTS_DEFAULT_MODIFIER: Self = Self(112);
    pub const EXPORT_DOES_NOT_SUPPORT_DEFAULT_MODIFIER: Self = Self(4294967183);
    pub const CLASSIFIABLE: Self = Self(2885600);
    pub const LATE_BINDING_CONTAINER: Self = Self(6256);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<SymbolFlags> for u32 {
    fn from(value: SymbolFlags) -> Self {
        value.0
    }
}

impl From<u32> for SymbolFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for SymbolFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for SymbolFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for SymbolFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for SymbolFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct CheckFlags(pub u32);

impl CheckFlags {
    pub const NONE: Self = Self(0);
    pub const INSTANTIATED: Self = Self(1);
    pub const SYNTHETIC_PROPERTY: Self = Self(2);
    pub const SYNTHETIC_METHOD: Self = Self(4);
    pub const READONLY: Self = Self(8);
    pub const READ_PARTIAL: Self = Self(16);
    pub const WRITE_PARTIAL: Self = Self(32);
    pub const HAS_NON_UNIFORM_TYPE: Self = Self(64);
    pub const HAS_LITERAL_TYPE: Self = Self(128);
    pub const CONTAINS_PUBLIC: Self = Self(256);
    pub const CONTAINS_PROTECTED: Self = Self(512);
    pub const CONTAINS_PRIVATE: Self = Self(1024);
    pub const CONTAINS_STATIC: Self = Self(2048);
    pub const LATE: Self = Self(4096);
    pub const REVERSE_MAPPED: Self = Self(8192);
    pub const OPTIONAL_PARAMETER: Self = Self(16384);
    pub const REST_PARAMETER: Self = Self(32768);
    pub const DEFERRED_TYPE: Self = Self(65536);
    pub const HAS_NEVER_TYPE: Self = Self(131072);
    pub const MAPPED: Self = Self(262144);
    pub const STRIP_OPTIONAL: Self = Self(524288);
    pub const UNRESOLVED: Self = Self(1048576);
    pub const IS_DISCRIMINANT_COMPUTED: Self = Self(2097152);
    pub const IS_DISCRIMINANT: Self = Self(4194304);
    pub const INDEX_SYMBOL: Self = Self(8388608);
    pub const SYNTHETIC: Self = Self(6);
    pub const NON_UNIFORM_AND_LITERAL: Self = Self(192);
    pub const PARTIAL: Self = Self(48);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<CheckFlags> for u32 {
    fn from(value: CheckFlags) -> Self {
        value.0
    }
}

impl From<u32> for CheckFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for CheckFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for CheckFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for CheckFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for CheckFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct ModifierFlags(pub u32);

impl ModifierFlags {
    pub const NONE: Self = Self(0);
    pub const PUBLIC: Self = Self(1);
    pub const PRIVATE: Self = Self(2);
    pub const PROTECTED: Self = Self(4);
    pub const READONLY: Self = Self(8);
    pub const OVERRIDE: Self = Self(16);
    pub const EXPORT: Self = Self(32);
    pub const ABSTRACT: Self = Self(64);
    pub const AMBIENT: Self = Self(128);
    pub const STATIC: Self = Self(256);
    pub const ACCESSOR: Self = Self(512);
    pub const ASYNC: Self = Self(1024);
    pub const DEFAULT: Self = Self(2048);
    pub const CONST: Self = Self(4096);
    pub const IN: Self = Self(8192);
    pub const OUT: Self = Self(16384);
    pub const DECORATOR: Self = Self(32768);
    pub const DEPRECATED: Self = Self(65536);
    pub const JS_DOC_PUBLIC: Self = Self(8388608);
    pub const JS_DOC_PRIVATE: Self = Self(16777216);
    pub const JS_DOC_PROTECTED: Self = Self(33554432);
    pub const JS_DOC_READONLY: Self = Self(67108864);
    pub const JS_DOC_OVERRIDE: Self = Self(134217728);
    pub const HAS_COMPUTED_JS_DOC_MODIFIERS: Self = Self(268435456);
    pub const HAS_COMPUTED_FLAGS: Self = Self(536870912);
    pub const SYNTACTIC_OR_JS_DOC_MODIFIERS: Self = Self(31);
    pub const SYNTACTIC_ONLY_MODIFIERS: Self = Self(65504);
    pub const SYNTACTIC_MODIFIERS: Self = Self(65535);
    pub const JS_DOC_CACHE_ONLY_MODIFIERS: Self = Self(260046848);
    pub const JS_DOC_ONLY_MODIFIERS: Self = Self(65536);
    pub const NON_CACHE_ONLY_MODIFIERS: Self = Self(131071);
    pub const ACCESSIBILITY_MODIFIER: Self = Self(7);
    pub const PARAMETER_PROPERTY_MODIFIER: Self = Self(31);
    pub const NON_PUBLIC_ACCESSIBILITY_MODIFIER: Self = Self(6);
    pub const TYPE_SCRIPT_MODIFIER: Self = Self(28895);
    pub const EXPORT_DEFAULT: Self = Self(2080);
    pub const ALL: Self = Self(131071);
    pub const MODIFIER: Self = Self(98303);
    pub const JAVA_SCRIPT: Self = Self(3872);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<ModifierFlags> for u32 {
    fn from(value: ModifierFlags) -> Self {
        value.0
    }
}

impl From<u32> for ModifierFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for ModifierFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for ModifierFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for ModifierFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for ModifierFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct AccessFlags(pub u32);

impl AccessFlags {
    pub const NONE: Self = Self(0);
    pub const INCLUDE_UNDEFINED: Self = Self(1);
    pub const NO_INDEX_SIGNATURES: Self = Self(2);
    pub const WRITING: Self = Self(4);
    pub const CACHE_SYMBOL: Self = Self(8);
    pub const ALLOW_MISSING: Self = Self(16);
    pub const EXPRESSION_POSITION: Self = Self(32);
    pub const REPORT_DEPRECATED: Self = Self(64);
    pub const SUPPRESS_NO_IMPLICIT_ANY_ERROR: Self = Self(128);
    pub const CONTEXTUAL: Self = Self(256);
    pub const PERSISTENT: Self = Self(1);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<AccessFlags> for u32 {
    fn from(value: AccessFlags) -> Self {
        value.0
    }
}

impl From<u32> for AccessFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for AccessFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for AccessFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for AccessFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for AccessFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct TypeFlags(pub u32);

impl TypeFlags {
    pub const NONE: Self = Self(0);
    pub const ANY: Self = Self(1);
    pub const UNKNOWN: Self = Self(2);
    pub const UNDEFINED: Self = Self(4);
    pub const NULL: Self = Self(8);
    pub const VOID: Self = Self(16);
    pub const STRING: Self = Self(32);
    pub const NUMBER: Self = Self(64);
    pub const BIG_INT: Self = Self(128);
    pub const BOOLEAN: Self = Self(256);
    pub const ES_SYMBOL: Self = Self(512);
    pub const STRING_LITERAL: Self = Self(1024);
    pub const NUMBER_LITERAL: Self = Self(2048);
    pub const BIG_INT_LITERAL: Self = Self(4096);
    pub const BOOLEAN_LITERAL: Self = Self(8192);
    pub const UNIQUE_ES_SYMBOL: Self = Self(16384);
    pub const ENUM_LITERAL: Self = Self(32768);
    pub const ENUM: Self = Self(65536);
    pub const NON_PRIMITIVE: Self = Self(131072);
    pub const NEVER: Self = Self(262144);
    pub const TYPE_PARAMETER: Self = Self(524288);
    pub const OBJECT: Self = Self(1048576);
    pub const INDEX: Self = Self(2097152);
    pub const TEMPLATE_LITERAL: Self = Self(4194304);
    pub const STRING_MAPPING: Self = Self(8388608);
    pub const SUBSTITUTION: Self = Self(16777216);
    pub const INDEXED_ACCESS: Self = Self(33554432);
    pub const CONDITIONAL: Self = Self(67108864);
    pub const UNION: Self = Self(134217728);
    pub const INTERSECTION: Self = Self(268435456);
    pub const RESERVED1: Self = Self(536870912);
    pub const RESERVED2: Self = Self(1073741824);
    pub const RESERVED3: Self = Self(2147483648);
    pub const ANY_OR_UNKNOWN: Self = Self(3);
    pub const NULLABLE: Self = Self(12);
    pub const LITERAL: Self = Self(15360);
    pub const UNIT: Self = Self(97292);
    pub const FRESHABLE: Self = Self(80896);
    pub const STRING_OR_NUMBER_LITERAL: Self = Self(3072);
    pub const STRING_OR_NUMBER_LITERAL_OR_UNIQUE: Self = Self(19456);
    pub const DEFINITELY_FALSY: Self = Self(15388);
    pub const POSSIBLY_FALSY: Self = Self(15868);
    pub const INTRINSIC: Self = Self(393983);
    pub const STRING_LIKE: Self = Self(12583968);
    pub const NUMBER_LIKE: Self = Self(67648);
    pub const BIG_INT_LIKE: Self = Self(4224);
    pub const BOOLEAN_LIKE: Self = Self(8448);
    pub const ENUM_LIKE: Self = Self(98304);
    pub const ES_SYMBOL_LIKE: Self = Self(16896);
    pub const VOID_LIKE: Self = Self(20);
    pub const PRIMITIVE: Self = Self(12713980);
    pub const DEFINITELY_NON_NULLABLE: Self = Self(13893600);
    pub const DISJOINT_DOMAINS: Self = Self(12812284);
    pub const UNION_OR_INTERSECTION: Self = Self(402653184);
    pub const STRUCTURED_TYPE: Self = Self(403701760);
    pub const TYPE_VARIABLE: Self = Self(34078720);
    pub const INSTANTIABLE_NON_PRIMITIVE: Self = Self(117964800);
    pub const INSTANTIABLE_PRIMITIVE: Self = Self(14680064);
    pub const INSTANTIABLE: Self = Self(132644864);
    pub const STRUCTURED_OR_INSTANTIABLE: Self = Self(536346624);
    pub const OBJECT_FLAGS_TYPE: Self = Self(403963917);
    pub const SIMPLIFIABLE: Self = Self(102760448);
    pub const SINGLETON: Self = Self(394239);
    pub const NARROWABLE: Self = Self(536575971);
    pub const INCLUDES_MASK: Self = Self(416808959);
    pub const INCLUDES_MISSING_TYPE: Self = Self(524288);
    pub const INCLUDES_NON_WIDENING_TYPE: Self = Self(2097152);
    pub const INCLUDES_WILDCARD: Self = Self(33554432);
    pub const INCLUDES_EMPTY_OBJECT: Self = Self(67108864);
    pub const INCLUDES_INSTANTIABLE: Self = Self(16777216);
    pub const INCLUDES_CONSTRAINED_TYPE_VARIABLE: Self = Self(536870912);
    pub const INCLUDES_ERROR: Self = Self(1073741824);
    pub const NOT_PRIMITIVE_UNION: Self = Self(286523411);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<TypeFlags> for u32 {
    fn from(value: TypeFlags) -> Self {
        value.0
    }
}

impl From<u32> for TypeFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for TypeFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for TypeFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for TypeFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for TypeFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct ObjectFlags(pub u32);

impl ObjectFlags {
    pub const NONE: Self = Self(0);
    pub const CLASS: Self = Self(1);
    pub const INTERFACE: Self = Self(2);
    pub const REFERENCE: Self = Self(4);
    pub const TUPLE: Self = Self(8);
    pub const ANONYMOUS: Self = Self(16);
    pub const MAPPED: Self = Self(32);
    pub const INSTANTIATED: Self = Self(64);
    pub const OBJECT_LITERAL: Self = Self(128);
    pub const EVOLVING_ARRAY: Self = Self(256);
    pub const OBJECT_LITERAL_PATTERN_WITH_COMPUTED_PROPERTIES: Self = Self(512);
    pub const REVERSE_MAPPED: Self = Self(1024);
    pub const JSX_ATTRIBUTES: Self = Self(2048);
    pub const JS_LITERAL: Self = Self(4096);
    pub const FRESH_LITERAL: Self = Self(8192);
    pub const ARRAY_LITERAL: Self = Self(16384);
    pub const PRIMITIVE_UNION: Self = Self(32768);
    pub const CONTAINS_WIDENING_TYPE: Self = Self(65536);
    pub const CONTAINS_OBJECT_OR_ARRAY_LITERAL: Self = Self(131072);
    pub const NON_INFERRABLE_TYPE: Self = Self(262144);
    pub const COULD_CONTAIN_TYPE_VARIABLES_COMPUTED: Self = Self(524288);
    pub const COULD_CONTAIN_TYPE_VARIABLES: Self = Self(1048576);
    pub const MEMBERS_RESOLVED: Self = Self(2097152);
    pub const CLASS_OR_INTERFACE: Self = Self(3);
    pub const REQUIRES_WIDENING: Self = Self(196608);
    pub const PROPAGATING_FLAGS: Self = Self(458752);
    pub const INSTANTIATED_MAPPED: Self = Self(96);
    pub const OBJECT_TYPE_KIND_MASK: Self = Self(50332991);
    pub const CONTAINS_SPREAD: Self = Self(4194304);
    pub const OBJECT_REST_TYPE: Self = Self(8388608);
    pub const INSTANTIATION_EXPRESSION_TYPE: Self = Self(16777216);
    pub const SINGLE_SIGNATURE_TYPE: Self = Self(33554432);
    pub const IS_CLASS_INSTANCE_CLONE: Self = Self(67108864);
    pub const IDENTICAL_BASE_TYPE_CALCULATED: Self = Self(134217728);
    pub const IDENTICAL_BASE_TYPE_EXISTS: Self = Self(268435456);
    pub const IS_GENERIC_TYPE_COMPUTED: Self = Self(4194304);
    pub const IS_GENERIC_OBJECT_TYPE: Self = Self(8388608);
    pub const IS_GENERIC_INDEX_TYPE: Self = Self(16777216);
    pub const IS_GENERIC_TYPE: Self = Self(25165824);
    pub const CONTAINS_INTERSECTIONS: Self = Self(33554432);
    pub const IS_UNKNOWN_LIKE_UNION_COMPUTED: Self = Self(67108864);
    pub const IS_UNKNOWN_LIKE_UNION: Self = Self(134217728);
    pub const IS_NEVER_INTERSECTION_COMPUTED: Self = Self(33554432);
    pub const IS_NEVER_INTERSECTION: Self = Self(67108864);
    pub const IS_CONSTRAINED_TYPE_VARIABLE: Self = Self(134217728);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<ObjectFlags> for u32 {
    fn from(value: ObjectFlags) -> Self {
        value.0
    }
}

impl From<u32> for ObjectFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for ObjectFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for ObjectFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for ObjectFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for ObjectFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct ElementFlags(pub u32);

impl ElementFlags {
    pub const NONE: Self = Self(0);
    pub const REQUIRED: Self = Self(1);
    pub const OPTIONAL: Self = Self(2);
    pub const REST: Self = Self(4);
    pub const VARIADIC: Self = Self(8);
    pub const FIXED: Self = Self(3);
    pub const VARIABLE: Self = Self(12);
    pub const NON_REQUIRED: Self = Self(14);
    pub const NON_REST: Self = Self(11);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<ElementFlags> for u32 {
    fn from(value: ElementFlags) -> Self {
        value.0
    }
}

impl From<u32> for ElementFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for ElementFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for ElementFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for ElementFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for ElementFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct IndexFlags(pub u32);

impl IndexFlags {
    pub const NONE: Self = Self(0);
    pub const STRINGS_ONLY: Self = Self(1);
    pub const NO_INDEX_SIGNATURES: Self = Self(2);
    pub const NO_REDUCIBLE_CHECK: Self = Self(4);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<IndexFlags> for u32 {
    fn from(value: IndexFlags) -> Self {
        value.0
    }
}

impl From<u32> for IndexFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for IndexFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for IndexFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for IndexFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for IndexFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(transparent)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Default)]
pub struct SignatureFlags(pub u32);

impl SignatureFlags {
    pub const NONE: Self = Self(0);
    pub const HAS_REST_PARAMETER: Self = Self(1);
    pub const HAS_LITERAL_TYPES: Self = Self(2);
    pub const CONSTRUCT: Self = Self(4);
    pub const ABSTRACT: Self = Self(8);
    pub const IS_INNER_CALL_CHAIN: Self = Self(16);
    pub const IS_OUTER_CALL_CHAIN: Self = Self(32);
    pub const IS_UNTYPED_SIGNATURE_IN_JS_FILE: Self = Self(64);
    pub const IS_NON_INFERRABLE: Self = Self(128);
    pub const IS_SIGNATURE_CANDIDATE_FOR_OVERLOAD_FAILURE: Self = Self(256);
    pub const PROPAGATING_FLAGS: Self = Self(335);
    pub const CALL_CHAIN_FLAGS: Self = Self(48);

    #[inline(always)]
    pub const fn contains(self, other: Self) -> bool {
        (self.0 & other.0) == other.0
    }

    #[inline(always)]
    pub const fn intersects(self, other: Self) -> bool {
        (self.0 & other.0) != 0
    }
}

impl From<SignatureFlags> for u32 {
    fn from(value: SignatureFlags) -> Self {
        value.0
    }
}

impl From<u32> for SignatureFlags {
    fn from(value: u32) -> Self {
        Self(value)
    }
}

impl std::ops::BitOr for SignatureFlags {
    type Output = Self;

    fn bitor(self, rhs: Self) -> Self::Output {
        Self(self.0 | rhs.0)
    }
}

impl std::ops::BitOrAssign for SignatureFlags {
    fn bitor_assign(&mut self, rhs: Self) {
        self.0 |= rhs.0;
    }
}

impl std::ops::BitAnd for SignatureFlags {
    type Output = Self;

    fn bitand(self, rhs: Self) -> Self::Output {
        Self(self.0 & rhs.0)
    }
}

impl std::ops::BitAndAssign for SignatureFlags {
    fn bitand_assign(&mut self, rhs: Self) {
        self.0 &= rhs.0;
    }
}

#[repr(i16)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum Kind {
    Unknown = 0,
    EndOfFile = 1,
    SingleLineCommentTrivia = 2,
    MultiLineCommentTrivia = 3,
    NewLineTrivia = 4,
    WhitespaceTrivia = 5,
    ConflictMarkerTrivia = 6,
    NonTextFileMarkerTrivia = 7,
    NumericLiteral = 8,
    BigIntLiteral = 9,
    StringLiteral = 10,
    JsxText = 11,
    JsxTextAllWhiteSpaces = 12,
    RegularExpressionLiteral = 13,
    NoSubstitutionTemplateLiteral = 14,
    TemplateHead = 15,
    TemplateMiddle = 16,
    TemplateTail = 17,
    OpenBraceToken = 18,
    CloseBraceToken = 19,
    OpenParenToken = 20,
    CloseParenToken = 21,
    OpenBracketToken = 22,
    CloseBracketToken = 23,
    DotToken = 24,
    DotDotDotToken = 25,
    SemicolonToken = 26,
    CommaToken = 27,
    QuestionDotToken = 28,
    LessThanToken = 29,
    LessThanSlashToken = 30,
    GreaterThanToken = 31,
    LessThanEqualsToken = 32,
    GreaterThanEqualsToken = 33,
    EqualsEqualsToken = 34,
    ExclamationEqualsToken = 35,
    EqualsEqualsEqualsToken = 36,
    ExclamationEqualsEqualsToken = 37,
    EqualsGreaterThanToken = 38,
    PlusToken = 39,
    MinusToken = 40,
    AsteriskToken = 41,
    AsteriskAsteriskToken = 42,
    SlashToken = 43,
    PercentToken = 44,
    PlusPlusToken = 45,
    MinusMinusToken = 46,
    LessThanLessThanToken = 47,
    GreaterThanGreaterThanToken = 48,
    GreaterThanGreaterThanGreaterThanToken = 49,
    AmpersandToken = 50,
    BarToken = 51,
    CaretToken = 52,
    ExclamationToken = 53,
    TildeToken = 54,
    AmpersandAmpersandToken = 55,
    BarBarToken = 56,
    QuestionToken = 57,
    ColonToken = 58,
    AtToken = 59,
    QuestionQuestionToken = 60,
    BacktickToken = 61,
    HashToken = 62,
    EqualsToken = 63,
    PlusEqualsToken = 64,
    MinusEqualsToken = 65,
    AsteriskEqualsToken = 66,
    AsteriskAsteriskEqualsToken = 67,
    SlashEqualsToken = 68,
    PercentEqualsToken = 69,
    LessThanLessThanEqualsToken = 70,
    GreaterThanGreaterThanEqualsToken = 71,
    GreaterThanGreaterThanGreaterThanEqualsToken = 72,
    AmpersandEqualsToken = 73,
    BarEqualsToken = 74,
    BarBarEqualsToken = 75,
    AmpersandAmpersandEqualsToken = 76,
    QuestionQuestionEqualsToken = 77,
    CaretEqualsToken = 78,
    Identifier = 79,
    PrivateIdentifier = 80,
    JSDocCommentTextToken = 81,
    BreakKeyword = 82,
    CaseKeyword = 83,
    CatchKeyword = 84,
    ClassKeyword = 85,
    ConstKeyword = 86,
    ContinueKeyword = 87,
    DebuggerKeyword = 88,
    DefaultKeyword = 89,
    DeleteKeyword = 90,
    DoKeyword = 91,
    ElseKeyword = 92,
    EnumKeyword = 93,
    ExportKeyword = 94,
    ExtendsKeyword = 95,
    FalseKeyword = 96,
    FinallyKeyword = 97,
    ForKeyword = 98,
    FunctionKeyword = 99,
    IfKeyword = 100,
    ImportKeyword = 101,
    InKeyword = 102,
    InstanceOfKeyword = 103,
    NewKeyword = 104,
    NullKeyword = 105,
    ReturnKeyword = 106,
    SuperKeyword = 107,
    SwitchKeyword = 108,
    ThisKeyword = 109,
    ThrowKeyword = 110,
    TrueKeyword = 111,
    TryKeyword = 112,
    TypeOfKeyword = 113,
    VarKeyword = 114,
    VoidKeyword = 115,
    WhileKeyword = 116,
    WithKeyword = 117,
    ImplementsKeyword = 118,
    InterfaceKeyword = 119,
    LetKeyword = 120,
    PackageKeyword = 121,
    PrivateKeyword = 122,
    ProtectedKeyword = 123,
    PublicKeyword = 124,
    StaticKeyword = 125,
    YieldKeyword = 126,
    AbstractKeyword = 127,
    AccessorKeyword = 128,
    AsKeyword = 129,
    AssertsKeyword = 130,
    AssertKeyword = 131,
    AnyKeyword = 132,
    AsyncKeyword = 133,
    AwaitKeyword = 134,
    BooleanKeyword = 135,
    ConstructorKeyword = 136,
    DeclareKeyword = 137,
    GetKeyword = 138,
    ImmediateKeyword = 139,
    InferKeyword = 140,
    IntrinsicKeyword = 141,
    IsKeyword = 142,
    KeyOfKeyword = 143,
    ModuleKeyword = 144,
    NamespaceKeyword = 145,
    NeverKeyword = 146,
    OutKeyword = 147,
    ReadonlyKeyword = 148,
    RequireKeyword = 149,
    NumberKeyword = 150,
    ObjectKeyword = 151,
    SatisfiesKeyword = 152,
    SetKeyword = 153,
    StringKeyword = 154,
    SymbolKeyword = 155,
    TypeKeyword = 156,
    UndefinedKeyword = 157,
    UniqueKeyword = 158,
    UnknownKeyword = 159,
    UsingKeyword = 160,
    FromKeyword = 161,
    GlobalKeyword = 162,
    BigIntKeyword = 163,
    OverrideKeyword = 164,
    OfKeyword = 165,
    DeferKeyword = 166,
    QualifiedName = 167,
    ComputedPropertyName = 168,
    TypeParameter = 169,
    Parameter = 170,
    Decorator = 171,
    PropertySignature = 172,
    PropertyDeclaration = 173,
    MethodSignature = 174,
    MethodDeclaration = 175,
    ClassStaticBlockDeclaration = 176,
    Constructor = 177,
    GetAccessor = 178,
    SetAccessor = 179,
    CallSignature = 180,
    ConstructSignature = 181,
    IndexSignature = 182,
    TypePredicate = 183,
    TypeReference = 184,
    FunctionType = 185,
    ConstructorType = 186,
    TypeQuery = 187,
    TypeLiteral = 188,
    ArrayType = 189,
    TupleType = 190,
    OptionalType = 191,
    RestType = 192,
    UnionType = 193,
    IntersectionType = 194,
    ConditionalType = 195,
    InferType = 196,
    ParenthesizedType = 197,
    ThisType = 198,
    TypeOperator = 199,
    IndexedAccessType = 200,
    MappedType = 201,
    LiteralType = 202,
    NamedTupleMember = 203,
    TemplateLiteralType = 204,
    TemplateLiteralTypeSpan = 205,
    ImportType = 206,
    ObjectBindingPattern = 207,
    ArrayBindingPattern = 208,
    BindingElement = 209,
    ArrayLiteralExpression = 210,
    ObjectLiteralExpression = 211,
    PropertyAccessExpression = 212,
    ElementAccessExpression = 213,
    CallExpression = 214,
    NewExpression = 215,
    TaggedTemplateExpression = 216,
    TypeAssertionExpression = 217,
    ParenthesizedExpression = 218,
    FunctionExpression = 219,
    ArrowFunction = 220,
    DeleteExpression = 221,
    TypeOfExpression = 222,
    VoidExpression = 223,
    AwaitExpression = 224,
    PrefixUnaryExpression = 225,
    PostfixUnaryExpression = 226,
    BinaryExpression = 227,
    ConditionalExpression = 228,
    TemplateExpression = 229,
    YieldExpression = 230,
    SpreadElement = 231,
    ClassExpression = 232,
    OmittedExpression = 233,
    ExpressionWithTypeArguments = 234,
    AsExpression = 235,
    NonNullExpression = 236,
    MetaProperty = 237,
    SyntheticExpression = 238,
    SatisfiesExpression = 239,
    TemplateSpan = 240,
    SemicolonClassElement = 241,
    Block = 242,
    EmptyStatement = 243,
    VariableStatement = 244,
    ExpressionStatement = 245,
    IfStatement = 246,
    DoStatement = 247,
    WhileStatement = 248,
    ForStatement = 249,
    ForInStatement = 250,
    ForOfStatement = 251,
    ContinueStatement = 252,
    BreakStatement = 253,
    ReturnStatement = 254,
    WithStatement = 255,
    SwitchStatement = 256,
    LabeledStatement = 257,
    ThrowStatement = 258,
    TryStatement = 259,
    DebuggerStatement = 260,
    VariableDeclaration = 261,
    VariableDeclarationList = 262,
    FunctionDeclaration = 263,
    ClassDeclaration = 264,
    InterfaceDeclaration = 265,
    TypeAliasDeclaration = 266,
    EnumDeclaration = 267,
    ModuleDeclaration = 268,
    ModuleBlock = 269,
    CaseBlock = 270,
    NamespaceExportDeclaration = 271,
    ImportEqualsDeclaration = 272,
    ImportDeclaration = 273,
    ImportClause = 274,
    NamespaceImport = 275,
    NamedImports = 276,
    ImportSpecifier = 277,
    ExportAssignment = 278,
    ExportDeclaration = 279,
    NamedExports = 280,
    NamespaceExport = 281,
    ExportSpecifier = 282,
    MissingDeclaration = 283,
    ExternalModuleReference = 284,
    JsxElement = 285,
    JsxSelfClosingElement = 286,
    JsxOpeningElement = 287,
    JsxClosingElement = 288,
    JsxFragment = 289,
    JsxOpeningFragment = 290,
    JsxClosingFragment = 291,
    JsxAttribute = 292,
    JsxAttributes = 293,
    JsxSpreadAttribute = 294,
    JsxExpression = 295,
    JsxNamespacedName = 296,
    CaseClause = 297,
    DefaultClause = 298,
    HeritageClause = 299,
    CatchClause = 300,
    ImportAttributes = 301,
    ImportAttribute = 302,
    PropertyAssignment = 303,
    ShorthandPropertyAssignment = 304,
    SpreadAssignment = 305,
    EnumMember = 306,
    SourceFile = 307,
    JSDocTypeExpression = 308,
    JSDocNameReference = 309,
    JSDocMemberName = 310,
    JSDocAllType = 311,
    JSDocNullableType = 312,
    JSDocNonNullableType = 313,
    JSDocOptionalType = 314,
    JSDocVariadicType = 315,
    JSDoc = 316,
    JSDocText = 317,
    JSDocTypeLiteral = 318,
    JSDocSignature = 319,
    JSDocLink = 320,
    JSDocLinkCode = 321,
    JSDocLinkPlain = 322,
    JSDocTag = 323,
    JSDocAugmentsTag = 324,
    JSDocImplementsTag = 325,
    JSDocDeprecatedTag = 326,
    JSDocPublicTag = 327,
    JSDocPrivateTag = 328,
    JSDocProtectedTag = 329,
    JSDocReadonlyTag = 330,
    JSDocOverrideTag = 331,
    JSDocCallbackTag = 332,
    JSDocOverloadTag = 333,
    JSDocParameterTag = 334,
    JSDocReturnTag = 335,
    JSDocThisTag = 336,
    JSDocTypeTag = 337,
    JSDocTemplateTag = 338,
    JSDocTypedefTag = 339,
    JSDocSeeTag = 340,
    JSDocPropertyTag = 341,
    JSDocThrowsTag = 342,
    JSDocSatisfiesTag = 343,
    JSDocImportTag = 344,
    SyntaxList = 345,
    JSTypeAliasDeclaration = 346,
    JSExportAssignment = 347,
    CommonJSExport = 348,
    JSImportDeclaration = 349,
    NotEmittedStatement = 350,
    PartiallyEmittedExpression = 351,
    CommaListExpression = 352,
    SyntheticReferenceExpression = 353,
    NotEmittedTypeElement = 354,
}

#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum TypePredicateKind {
    This = 0,
    Identifier = 1,
    AssertsThis = 2,
    AssertsIdentifier = 3,
}
