@@ -58,7 +58,7 @@ declare module "vm" {
5858 }
5959 interface ScriptOptions extends BaseOptions {
6060 /**
61- * V8's code cache data for the supplied source.
61+ * Provides an optional data with V8's code cache data for the supplied source.
6262 */
6363 cachedData ?: Buffer | NodeJS . ArrayBufferView | undefined ;
6464 /** @deprecated in favor of `script.createCachedData()` */
@@ -108,18 +108,24 @@ declare module "vm" {
108108 microtaskMode ?: CreateContextOptions [ "microtaskMode" ] ;
109109 }
110110 interface RunningCodeOptions extends RunningScriptOptions {
111- cachedData ?: ScriptOptions [ "cachedData" ] ;
111+ /**
112+ * Provides an optional data with V8's code cache data for the supplied source.
113+ */
114+ cachedData ?: ScriptOptions [ "cachedData" ] | undefined ;
112115 importModuleDynamically ?: ScriptOptions [ "importModuleDynamically" ] ;
113116 }
114117 interface RunningCodeInNewContextOptions extends RunningScriptInNewContextOptions {
115- cachedData ?: ScriptOptions [ "cachedData" ] ;
118+ /**
119+ * Provides an optional data with V8's code cache data for the supplied source.
120+ */
121+ cachedData ?: ScriptOptions [ "cachedData" ] | undefined ;
116122 importModuleDynamically ?: ScriptOptions [ "importModuleDynamically" ] ;
117123 }
118124 interface CompileFunctionOptions extends BaseOptions {
119125 /**
120126 * Provides an optional data with V8's code cache data for the supplied source.
121127 */
122- cachedData ?: Buffer | undefined ;
128+ cachedData ?: ScriptOptions [ "cachedData" ] | undefined ;
123129 /**
124130 * Specifies whether to produce new cache data.
125131 * Default: `false`,
@@ -612,6 +618,9 @@ declare module "vm" {
612618 * @default 'vm:module(i)' where i is a context-specific ascending index.
613619 */
614620 identifier ?: string | undefined ;
621+ /**
622+ * Provides an optional data with V8's code cache data for the supplied source.
623+ */
615624 cachedData ?: ScriptOptions [ "cachedData" ] | undefined ;
616625 context ?: Context | undefined ;
617626 lineOffset ?: BaseOptions [ "lineOffset" ] | undefined ;
0 commit comments