TypeScript Support
PassageElement Type
<passage-auth>
, <passage-login>
, and <passage-register>
all support the same prototype taking an app-id
as an attribute, reflected as a property appId
, and accepting properties for onSuccess
and beforeAuth
to set custom callback behavior.
If you are using TypeScript with your project you can import a PassageElement
interface to see all available properties and methods on the elements:
Note: You will still need to import the top level package as a separate import because this is needed to register the custom elements for use in your module.
The PassageElement
interface is defined as:
Using this interface allows you to add additional type safety when interacting with the properties and methods on Passage Elements.
PassageProfileElement Type
The <passage-profile>
and <passage-passkey-table>
elements have a similar type to PassageElement
called PassageProfileElement
. This type shares most of the properties as PassageElement
but does not have any callback properties.
The PassageProfileElement type can be imported from the same top-level package entry point:
The full PassageProfileElement
interface is defined as:
Last updated