Mario Zechner e324cf5cb1 [c] Port type extractor to TypeScript and improve codegen
- Ported extract-spine-cpp-types.js to TypeScript in type-extractor.ts
- Improved type interfaces with discriminated unions for better type safety
- Added proper isConst tracking for const-qualified methods
- Fixed exclusions to check method.isConst instead of return type
- Removed special type mappings (utf8, spine_void) - primitives pass through unchanged
- Made toCTypeName strict with proper error handling
- Documented all conversion functions with examples
- Excluded SpineObject from extraction (matches JS behavior)
- Removed original JS extractor as it's now replaced by TypeScript version

The TypeScript extractor produces identical output (107 files, 164 types) while providing better type information including isConst for methods and consistent isStatic fields.

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-09 02:27:20 +02:00

54 lines
1.5 KiB
Plaintext

# Excluded types (whole type is skipped)
type: SkeletonClipping
type: Triangulator
type: SpineObject
type: TextureLoader
type: DebugExtension
type: DefaultSpineExtension
type: SpineExtension
type: Updateable
type: Pair
type: EventListener
type: AnimationStateListener
type: AnimationStateListenerObject
type: Pool
type: ArrayUtils
type: BlockAllocator
type: MathUtil
type: Array
type: PoolObject
type: HasRendererObject
type: String
type: StringBuffer
type: EventQueue
type: Json
type: BaseTimeline
# We handle those in extensions.cpp through a simpler mechanism
method: AnimationState::setListener
method: AnimationState::addListener
method: AnimationState::removeListener
method: AnimationState::clearListeners
method: TrackEntry::setListener
method: TrackEntry::getListener
# Used in UE4, not used anywhere else
method: AnimationState::setRendererObject
method: TrackEntry::setRendererObject
# Array<String> methods need special handling
method: AttachmentTimeline.getAttachmentNames
# Can not emulate AttachmentMap::Entries, as that's stack allocated
method: Skin::getAttachments
# Exclude const versions of getSetupPose() - we'll only expose the non-const version
method: BoneData::getSetupPose const
method: ConstraintDataGeneric::getSetupPose const
method: IkConstraintData::getSetupPose const
method: PathConstraintData::getSetupPose const
method: PhysicsConstraintData::getSetupPose const
method: PosedDataGeneric::getSetupPose const
method: SliderData::getSetupPose const
method: SlotData::getSetupPose const
method: TransformConstraintData::getSetupPose const