• Helper to transform given mutable instance into flat object. Properties with undefined values are not copied.

    Parameters

    • instance: any

      the instance to introspect.

    Returns Record<PropertyKey, any>

    values of all properties;

    Example

    let Clazz = declare({
    firstName: "",
    lastName: "",
    });

    let instance = new Clazz({firstName:"Test"});

    let state = toObject(instance);
    //-> { firstName: "Test", lastName:"" }

Generated using TypeDoc