Skip to content

Commit

Permalink
fix: resolve missing types for the cryptoRuntime const
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Oct 2, 2023
1 parent b58b2de commit 1627965
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export type {
CompactJWSHeaderParameters,
JWTHeaderParameters,
JSONWebKeySet,
CryptoRuntime,
} from './types.d'

export { default as cryptoRuntime } from './runtime/runtime.js'
export { default as cryptoRuntime } from './util/runtime.js'
4 changes: 1 addition & 3 deletions src/runtime/browser/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import { CryptoRuntime } from '../../types.d'

export default 'WebCryptoAPI' as CryptoRuntime
export default 'WebCryptoAPI'
4 changes: 1 addition & 3 deletions src/runtime/node/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
import { CryptoRuntime } from '../../types.d'

export default 'node:crypto' as CryptoRuntime
export default 'node:crypto'
3 changes: 3 additions & 0 deletions src/util/runtime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import value from '../runtime/runtime.js'
import type { CryptoRuntime } from '../types.d'
export default value as CryptoRuntime

0 comments on commit 1627965

Please sign in to comment.