Skip to content

results in completion handler of performQuery should be typed  #210

@cychiuae

Description

@cychiuae

Currently the type of results in completion handler of performQuery is NSArray *. It makes us developers need to force cast the results to [SKYRecord] in Swift every time
i.e.

for todo in results as! [SKYRecord] {
    print ("Got a todo \(todo["title"])")
}

which is pretty ignoring.

We can easily fix that by change the type of results to NSArray<SKYRecord *> *.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions