• Validates a given object against a given schema. Throws an error if the object is invalid

    Parameters

    • object: any

      The object to be validated

    Returns { id: number; name: string }