Skip to content

Commit 15ff87c

Browse files
committed
Update types and match v0.5.7 exports. Fixes #52.
1 parent 1c5337d commit 15ff87c

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"exports": {
1313
".": {
1414
"import": "./dist/webauthn-json.js",
15-
"types": "./dist/types/webauthn-json/index.d.ts"
15+
"types": "./dist/types/index.d.ts"
1616
},
1717
"./extended": {
1818
"import": "./dist/webauthn-json.extended.js",
19-
"types": "./dist/types/webauthn-json/extended.d.ts"
19+
"types": "./dist/types/extended.d.ts"
2020
}
2121
},
2222
"devDependencies": {

src/webauthn-json/extended.ts

+2-16
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,13 @@ export {
99
getResponseToJSON,
1010
} from "./basic/api";
1111

12-
import type {
12+
export type {
1313
CredentialCreationOptionsJSON,
1414
CredentialRequestOptionsJSON,
1515
PublicKeyCredentialWithAssertionJSON,
1616
PublicKeyCredentialWithAttestationJSON,
1717
} from "./basic/json";
1818

19-
export type {
20-
CredentialCreationOptionsJSON,
21-
PublicKeyCredentialWithAttestationJSON,
22-
CredentialRequestOptionsJSON,
23-
PublicKeyCredentialWithAssertionJSON,
24-
};
25-
2619
// Extended
2720

2821
export {
@@ -34,19 +27,12 @@ export {
3427
getExtendedResponseToJSON,
3528
} from "./extended/api";
3629

37-
import type {
38-
CredentialCreationOptionsExtendedJSON,
39-
CredentialRequestOptionsExtendedJSON,
40-
PublicKeyCredentialWithAssertionExtendedResultsJSON,
41-
PublicKeyCredentialWithAttestationExtendedResultsJSON,
42-
} from "./extended/json";
43-
4430
export type {
4531
CredentialCreationOptionsExtendedJSON,
4632
CredentialRequestOptionsExtendedJSON,
4733
PublicKeyCredentialWithAssertionExtendedResultsJSON,
4834
PublicKeyCredentialWithAttestationExtendedResultsJSON,
49-
};
35+
} from "./extended/json";
5036

5137
// Conversion
5238

src/webauthn-json/index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
export { create, get } from "./basic/api";
22
export { supported } from "./basic/supported";
33
export { schema } from "./basic/schema";
4+
5+
export type {
6+
PublicKeyCredentialDescriptorJSON,
7+
PublicKeyCredentialWithAssertionJSON,
8+
PublicKeyCredentialWithAttestationJSON,
9+
} from "./basic/json";

0 commit comments

Comments
 (0)