Skip to content

[1.21.1] Syntactically invalid object literal types dumped for record types #159

Description

@KonSola5
/**
	 * Class-specific type exported by ProbeJS, use global Type_
	 * types for convenience unless there's a naming conflict.
	 */
	export type $ExplosionProperties$$Type =
		| {
				largeParticles?: $ParticleOptions$$Type
				explosionSound?: $Holder$$Type<$SoundEvent>
				damageSource?: $DamageSource$$Type
				particles?: boolean?
				causesFire?: boolean?
				mode?: $Level$ExplosionInteraction$$Type
				source?: $Entity$$Type
				strength?: float?
				smallParticles?: $ParticleOptions$$Type
				damageCalculator?: $ExplosionDamageCalculator$$Type
		  }
		| [
				largeParticles?: $ParticleOptions$$Type,
				explosionSound?: $Holder$$Type<$SoundEvent>,
				damageSource?: $DamageSource$$Type,
				particles?: boolean?,
				causesFire?: boolean?,
				mode?: $Level$ExplosionInteraction$$Type,
				source?: $Entity$$Type,
				strength?: float?,
				smallParticles?: $ParticleOptions$$Type,
				damageCalculator?: $ExplosionDamageCalculator$$Type,
		  ]

? cannot go after a type name, so Type? syntax is invalid.
If the intention was to make the type nullable, use Type | null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions