Skip to content

TiledObject.properties is optional #12

@AdrienLemaire

Description

@AdrienLemaire

We've noticed that objects without properties will not have a properties key initialized to [] as per the types.

Can we update the types as follow ?

/**
 * @see https://doc.mapeditor.org/en/stable/reference/json-map-format/#object
 */
export interface TiledObject {
    ellipse?: boolean;
    gid?: number;
    height: number;
    id: number;
    name: string;
    point?: boolean;
    polygon?: Point[];
    polyline?: Point[];
-    properties: TiledProperty[];
+    properties?: TiledProperty[];

Using tiled v1.5.0

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