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
Currently, all paths have the type Path and the getCapability functions accepts an argument of type Path and returns an optional capability if the argument has the correct domain,
However, this run-time check is confusing and can be moved to a static check by typing paths based on domain, and changing the parameter type of the getCapability functions.
Definition of Done
Sema:
Introduce StoragePath, CapabilityPath, PublicPath, and PrivatePath
Make PublicPath, and PrivatePath a subtype of CapabilityPath
Change the type of path literals, based on the domain
Change the save function to accept a StoragePath
Change the load function to accept a StoragePath
Change the copy function to accept a StoragePath
Change the borrow function to accept a StoragePath
Change the link function to accept a CapabilityPath
Change the unlink function to accept a CapabilityPath
Change the getLinkTarget function to accept a CapabilityPath
Change the AuthAccount.getCapability function to accept a CapabilityPath
Change the PublicAccount.getCapability function to accept a PublicPath
Change the getCapability functions to return a non-optional type
Interpreter: Change the getCapability functions to return a non-optional value
Tests
Documentation
Update type hierarchy
The text was updated successfully, but these errors were encountered:
Issue To Be Solved
Currently, all paths have the type
Path
and thegetCapability
functions accepts an argument of typePath
and returns an optional capability if the argument has the correct domain,However, this run-time check is confusing and can be moved to a static check by typing paths based on domain, and changing the parameter type of the
getCapability
functions.Definition of Done
StoragePath
,CapabilityPath
,PublicPath
, andPrivatePath
PublicPath
, andPrivatePath
a subtype ofCapabilityPath
save
function to accept aStoragePath
load
function to accept aStoragePath
copy
function to accept aStoragePath
borrow
function to accept aStoragePath
link
function to accept aCapabilityPath
unlink
function to accept aCapabilityPath
getLinkTarget
function to accept aCapabilityPath
AuthAccount.getCapability
function to accept aCapabilityPath
PublicAccount.getCapability
function to accept aPublicPath
getCapability
functions to return a non-optional typegetCapability
functions to return a non-optional valueThe text was updated successfully, but these errors were encountered: