diff --git a/src/constants.js b/src/constants.ts similarity index 99% rename from src/constants.js rename to src/constants.ts index 7a714e907..2a52b4697 100644 --- a/src/constants.js +++ b/src/constants.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import Utils from './utils/util'; /** diff --git a/src/easypost.js b/src/easypost.ts similarity index 99% rename from src/easypost.js rename to src/easypost.ts index b86082806..ea35bbdbf 100644 --- a/src/easypost.js +++ b/src/easypost.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import util from 'util'; import { v4 as uuid } from 'uuid'; diff --git a/src/utils/internal_util.js b/src/utils/internal_util.ts similarity index 93% rename from src/utils/internal_util.js rename to src/utils/internal_util.ts index 99385e7d2..09f27f487 100644 --- a/src/utils/internal_util.js +++ b/src/utils/internal_util.ts @@ -1,3 +1,4 @@ +// @ts-nocheck /** * Utility class of various internal helper functions. * This class is not designed to be used directly by consumers of the library. diff --git a/src/utils/util.js b/src/utils/util.ts similarity index 99% rename from src/utils/util.js rename to src/utils/util.ts index ab26d7804..6c6be45a2 100644 --- a/src/utils/util.js +++ b/src/utils/util.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import crypto from 'crypto'; import util from 'util'; diff --git a/tsconfig.build.json b/tsconfig.build.json index e301a68b4..f4bfc21ac 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -3,6 +3,7 @@ "compilerOptions": { "allowJs": true, "checkJs": false, + "noImplicitAny": false, "declaration": true, "noEmit": true }, diff --git a/vite.config.js b/vite.config.js index 901662487..653e064df 100644 --- a/vite.config.js +++ b/vite.config.js @@ -10,7 +10,7 @@ export default defineConfig({ // drop node 12 support in the future, change this to the next min version target: 'node12', lib: { - entry: path.resolve(__dirname, 'src/easypost.js'), + entry: path.resolve(__dirname, 'src/easypost.ts'), fileName: 'easypost', }, sourcemap: isDev, @@ -32,7 +32,7 @@ export default defineConfig({ }, resolve: { - extensions: ['.js'], + extensions: ['.ts', '.js'], alias: { '@': path.resolve(__dirname, 'src'), },