diff --git a/shared/constants/permissions.js b/shared/constants/permissions.ts similarity index 89% rename from shared/constants/permissions.js rename to shared/constants/permissions.ts index 77df6431f..f4f961cd6 100644 --- a/shared/constants/permissions.js +++ b/shared/constants/permissions.ts @@ -1,5 +1,5 @@ export const CaveatTypes = Object.freeze({ - restrictReturnedAccounts: 'restrictReturnedAccounts', + restrictReturnedAccounts: 'restrictReturnedAccounts' as const, }); export const RestrictedMethods = Object.freeze({ @@ -11,18 +11,18 @@ export const RestrictedMethods = Object.freeze({ 'snap_getBip44Entropy_*': 'snap_getBip44Entropy_*', 'wallet_snap_*': 'wallet_snap_*', ///: END:ONLY_INCLUDE_IN -}); +} as const); ///: BEGIN:ONLY_INCLUDE_IN(flask) export const PermissionNamespaces = Object.freeze({ snap_getBip44Entropy_: 'snap_getBip44Entropy_*', wallet_snap_: 'wallet_snap_*', -}); +} as const); export const EndowmentPermissions = Object.freeze({ 'endowment:network-access': 'endowment:network-access', 'endowment:long-running': 'endowment:long-running', -}); +} as const); // Methods / permissions in external packages that we are temporarily excluding. export const ExcludedSnapPermissions = new Set([]); diff --git a/shared/constants/time.js b/shared/constants/time.ts similarity index 100% rename from shared/constants/time.js rename to shared/constants/time.ts diff --git a/test/setup.js b/test/setup.js index 57e79a557..68a0b152c 100644 --- a/test/setup.js +++ b/test/setup.js @@ -1,4 +1,5 @@ require('@babel/register'); +require('ts-node/register'); require('./helpers/setup-helper');