@@ -11,7 +11,7 @@ import * as options from '../options';
1111
1212export { HttpsError } ;
1313
14- /** Internally used when parsing the options. */
14+ /** @hidden Internally used when parsing the options. */
1515interface InternalOptions {
1616 opts : options . GlobalOptions ;
1717 idToken : boolean ;
@@ -29,7 +29,8 @@ export interface BlockingOptions extends options.GlobalOptions {
2929}
3030
3131/**
32- * Handle an event that is triggered before a user is created.
32+ * Handles an event that is triggered before a user is created.
33+ * @param handler - Event handler which is run every time before a user is created
3334 */
3435export function beforeUserCreated (
3536 handler : (
@@ -40,6 +41,12 @@ export function beforeUserCreated(
4041 | void
4142 | Promise < void >
4243) : BlockingFunction ;
44+
45+ /**
46+ * Handles an event that is triggered before a user is created.
47+ * @param opts - Object containing function options
48+ * @param handler - Event handler which is run every time before a user is created
49+ */
4350export function beforeUserCreated (
4451 opts : BlockingOptions ,
4552 handler : (
@@ -50,6 +57,12 @@ export function beforeUserCreated(
5057 | void
5158 | Promise < void >
5259) : BlockingFunction ;
60+
61+ /**
62+ * Handles an event that is triggered before a user is created
63+ * @param optsOrHandler - Either an object containing function options, or an event handler (run before user creation)
64+ * @param handler? - If defined, an event handler which is run every time before a user is created
65+ */
5366export function beforeUserCreated (
5467 optsOrHandler :
5568 | BlockingOptions
@@ -72,7 +85,8 @@ export function beforeUserCreated(
7285}
7386
7487/**
75- * Handle an event that is triggered before a user is signed in.
88+ * Handles an event that is triggered before a user is signed in.
89+ * @param handler - Event handler which is run every time before a user is signed in
7690 */
7791export function beforeUserSignedIn (
7892 handler : (
@@ -83,6 +97,12 @@ export function beforeUserSignedIn(
8397 | void
8498 | Promise < void >
8599) : BlockingFunction ;
100+
101+ /**
102+ * Handles an event that is triggered before a user is signed in.
103+ * @param opts - Object containing function options
104+ * @param handler - Event handler which is run every time before a user is signed in
105+ */
86106export function beforeUserSignedIn (
87107 opts : BlockingOptions ,
88108 handler : (
@@ -93,6 +113,12 @@ export function beforeUserSignedIn(
93113 | void
94114 | Promise < void >
95115) : BlockingFunction ;
116+
117+ /**
118+ * Handles an event that is triggered before a user is signed in.
119+ * @param optsOrHandler - Either an object containing function options, or an event handler (run before user signin)
120+ * @param handler - Event handler which is run every time before a user is signed in
121+ */
96122export function beforeUserSignedIn (
97123 optsOrHandler :
98124 | BlockingOptions
@@ -114,7 +140,7 @@ export function beforeUserSignedIn(
114140 return beforeOperation ( 'beforeSignIn' , optsOrHandler , handler ) ;
115141}
116142
117- /** @internal */
143+ /** @hidden */
118144export function beforeOperation (
119145 eventType : AuthBlockingEventType ,
120146 optsOrHandler :
@@ -197,7 +223,7 @@ export function beforeOperation(
197223 return func ;
198224}
199225
200- /** @internal */
226+ /** @hidden */
201227export function getOpts ( blockingOptions : BlockingOptions ) : InternalOptions {
202228 const accessToken = blockingOptions . accessToken || false ;
203229 const idToken = blockingOptions . idToken || false ;
0 commit comments