diff --git a/auth0-js/auth0-js-tests.ts b/auth0-js/auth0-js-tests.ts
index 68d4e1797b..7c910d1765 100644
--- a/auth0-js/auth0-js-tests.ts
+++ b/auth0-js/auth0-js-tests.ts
@@ -1,4 +1,4 @@
-///
+import 'auth0-js';
let webAuth = new auth0.WebAuth({
domain: 'mine.auth0.com',
diff --git a/auth0-js/index.d.ts b/auth0-js/index.d.ts
index 0a0e004303..11cf16a3ed 100644
--- a/auth0-js/index.d.ts
+++ b/auth0-js/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Auth0.js v8.1.3
+// Type definitions for Auth0.js 8.1
// Project: https://github.com/auth0/auth0.js
// Definitions by: Adrian Chia
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -409,7 +409,7 @@ declare namespace auth0 {
interface Auth0Error {
error: any;
- errorDescription: string
+ errorDescription: string;
}
interface Auth0DecodedHash {
@@ -442,7 +442,7 @@ declare namespace auth0 {
connection: string;
send: string;
phoneNumber?: string;
- email?: string,
+ email?: string;
authParams?: any;
}
diff --git a/auth0-js/tsconfig.json b/auth0-js/tsconfig.json
index a2e16e19e0..62bab1e208 100644
--- a/auth0-js/tsconfig.json
+++ b/auth0-js/tsconfig.json
@@ -20,4 +20,4 @@
"index.d.ts",
"auth0-js-tests.ts"
]
-}
\ No newline at end of file
+}
diff --git a/auth0-js/v7/auth0-js-tests.ts b/auth0-js/v7/auth0-js-tests.ts
index d5ca0250d4..a68b17cb69 100644
--- a/auth0-js/v7/auth0-js-tests.ts
+++ b/auth0-js/v7/auth0-js-tests.ts
@@ -1,4 +1,5 @@
-///
+import 'auth0-js';
+
var auth0 = new Auth0({
domain: 'mine.auth0.com',
clientID: 'dsa7d77dsa7d7',
diff --git a/auth0-js/v7/index.d.ts b/auth0-js/v7/index.d.ts
index ee834d5c61..a93e979f2b 100644
--- a/auth0-js/v7/index.d.ts
+++ b/auth0-js/v7/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for Auth0.js v7.x
+// Type definitions for Auth0.js 7.0
// Project: https://github.com/auth0/auth0.js
// Definitions by: Robert McLaws
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
@@ -13,20 +13,20 @@ interface Window {
interface Auth0Static {
new(options: Auth0ClientOptions): Auth0Static;
- changePassword(options: any, callback?: Function): void;
+ changePassword(options: any, callback?: (error?: Auth0Error, valid?: any) => void): void;
decodeJwt(jwt: string): any;
login(options: any, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
loginWithPopup(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
loginWithResourceOwner(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: any) => any): void;
loginWithUsernamePassword(options: Auth0LoginOptions, callback: (error?: Auth0Error, profile?: Auth0UserProfile, id_token?: string, access_token?: string, state?: string) => any): void;
logout(query: string): void;
- getConnections(callback?: Function): void;
+ getConnections(callback?: (error?: Auth0Error, valid?: any) => void): void;
refreshToken(refreshToken: string, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
getDelegationToken(options: any, callback: (error?: Auth0Error, delegationResult?: Auth0DelegationToken) => any): void;
- getProfile(id_token: string, callback?: Function): Auth0UserProfile;
- getSSOData(withActiveDirectories: any, callback?: Function): void;
+ getProfile(id_token: string, callback?: (error?: Auth0Error, valid?: any) => void): Auth0UserProfile;
+ getSSOData(withActiveDirectories: any, callback?: (error?: Auth0Error, valid?: any) => void): void;
parseHash(hash: string): Auth0DecodedHash;
- signup(options: Auth0SignupOptions, callback: Function): void;
+ signup(options: Auth0SignupOptions, callback: (error?: Auth0Error, valid?: any) => void): void;
validateUser(options: any, callback: (error?: Auth0Error, valid?: any) => any): void;
}
@@ -132,5 +132,5 @@ interface Auth0DelegationToken {
declare const Auth0: Auth0Static;
declare module "auth0-js" {
- export = Auth0
+ export = Auth0;
}
diff --git a/auth0-js/v7/tsconfig.json b/auth0-js/v7/tsconfig.json
index 7413e97f44..bdabf7ef7f 100644
--- a/auth0-js/v7/tsconfig.json
+++ b/auth0-js/v7/tsconfig.json
@@ -12,12 +12,11 @@
"typeRoots": [
"../../"
],
- "paths": {
- "auth0-js": [
- "auth0-js/v7"
- ]
- },
"types": [],
+ "paths": {
+ "auth0-js": ["auth0-js/v7"],
+ "auth0-js/*": ["auth0-js/v7/*"]
+ },
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
diff --git a/auth0-lock/auth0-lock-tests.ts b/auth0-lock/auth0-lock-tests.ts
index 4b72edcfa1..8045386586 100644
--- a/auth0-lock/auth0-lock-tests.ts
+++ b/auth0-lock/auth0-lock-tests.ts
@@ -1,5 +1,5 @@
-///
-///
+import 'auth0-js/v7';
+import Auth0Lock from 'auth0-lock';
const CLIENT_ID = "YOUR_AUTH0_APP_CLIENTID";
const DOMAIN = "YOUR_DOMAIN_AT.auth0.com";
diff --git a/auth0-lock/package.json b/auth0-lock/package.json
new file mode 100644
index 0000000000..2d730992af
--- /dev/null
+++ b/auth0-lock/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "@types/auth0-js": "latest"
+ }
+}
diff --git a/auth0-lock/tsconfig.json b/auth0-lock/tsconfig.json
index 367445041e..09c9f8233c 100644
--- a/auth0-lock/tsconfig.json
+++ b/auth0-lock/tsconfig.json
@@ -20,4 +20,4 @@
"index.d.ts",
"auth0-lock-tests.ts"
]
-}
\ No newline at end of file
+}
diff --git a/auth0.widget/auth0.widget-tests.ts b/auth0.widget/auth0.widget-tests.ts
index 6277d4cc3a..f2ddda2146 100644
--- a/auth0.widget/auth0.widget-tests.ts
+++ b/auth0.widget/auth0.widget-tests.ts
@@ -1,5 +1,4 @@
-///
-
+import 'auth0-js/v7';
var widget: Auth0WidgetStatic = new Auth0Widget({
domain: 'mine.auth0.com',
diff --git a/auth0.widget/index.d.ts b/auth0.widget/index.d.ts
index cdefd9e0fd..36d99c9009 100644
--- a/auth0.widget/index.d.ts
+++ b/auth0.widget/index.d.ts
@@ -5,7 +5,6 @@
///
-
interface Auth0WidgetStatic {
new(params: Auth0Constructor): Auth0WidgetStatic;
diff --git a/auth0.widget/package.json b/auth0.widget/package.json
new file mode 100644
index 0000000000..2d730992af
--- /dev/null
+++ b/auth0.widget/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "@types/auth0-js": "latest"
+ }
+}
diff --git a/auth0.widget/tsconfig.json b/auth0.widget/tsconfig.json
index 7bba7e763f..8ceb7b3d73 100644
--- a/auth0.widget/tsconfig.json
+++ b/auth0.widget/tsconfig.json
@@ -19,4 +19,4 @@
"index.d.ts",
"auth0.widget-tests.ts"
]
-}
\ No newline at end of file
+}