You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, you may want to construct a TData by using a custom factory method when reading triples back to JS object. For now, the schema only gives back an object without prototype.
By giving the client the opportunity to provide a custom factory method, we enable a lot of scenario when a user want to retrieve object of a specific prototype.
I was first thinking of using the Object.setPrototypeOf() in the schema.read method but since this is not recommended, providing a custom func makes more sense.
The text was updated successfully, but these errors were encountered:
Sometimes, you may want to construct a
TData
by using a custom factory method when reading triples back to JS object. For now, the schema only gives back anobject
without prototype.By giving the client the opportunity to provide a custom factory method, we enable a lot of scenario when a user want to retrieve object of a specific prototype.
I was first thinking of using the
Object.setPrototypeOf()
in theschema.read
method but since this is not recommended, providing a custom func makes more sense.The text was updated successfully, but these errors were encountered: