fix(static-module-record): Propagate explicit types
MODIFY
packages/static-module-record/index.d.ts
packages/static-module-record/index.d.ts
-export { StaticModuleRecord } from './src/static-module-record.js';
+import type { PrecompiledStaticModuleInterface } from 'ses';
+
+export class StaticModuleRecord implements PrecompiledStaticModuleInterface {
+ constructor(source: string, location?: string);
+ imports: Array<string>;
+ exports: Array<string>;
+ reexports: Array<string>;
+ __syncModuleProgram__: string;
+ __liveExportsMap__: __LiveExportsMap__;
+ __fixedExportsMap__: __FixedExportsMap__;
+}

MODIFY
packages/static-module-record/jsconfig.json
packages/static-module-record/jsconfig.json
"strictNullChecks": true,
"moduleResolution": "node"
},
- "include": ["src/**/*.js"]
+ "include": ["**/*.js", "index.d.ts"]
}

MODIFY
packages/static-module-record/src/static-module-record.js
packages/static-module-record/src/static-module-record.js
@@ -39,6 +39,7 @@ const analyzeModule = makeModuleAnalyzer(babelStar.default || babelStar);
* @class
* @param {string} source
* @param {string} [url]
+ * @returns {import('ses').PrecompiledStaticModuleInterface}
*/
export function StaticModuleRecord(source, url) {
if (new.target === undefined) {

fix(static-module-record): Propagate explicit types