@datadog/js-instrumentation-wasm
Advanced tools
Comparing version
@@ -29,31 +29,42 @@ declare module '@datadog/js-instrumentation-wasm' { | ||
} | ||
export type PrivacyHelperSource = { | ||
/** | ||
* Declare the helper using the given JavaScript expression. | ||
* | ||
* Example: `{ code: '(v) => console.log(v)' }` will produce output like: | ||
* ```js | ||
* const $ = (v) => console.log(v); | ||
* ``` | ||
*/ | ||
/** | ||
* Declare the helper using the given JavaScript expression. | ||
* | ||
* Example: `{ code: '(v) => console.log(v)' }` will produce output like: | ||
* ```js | ||
* const $ = (v) => console.log(v); | ||
* ``` | ||
*/ | ||
export type ExpressionPrivacyHelperSource = { | ||
expression: { | ||
code: string; | ||
}; | ||
} | { | ||
/** | ||
* Declare the helper by importing the given function from the given module. | ||
* | ||
* Example: `{ module: 'custom/helpers', func: 'foo' }` will produce output like: | ||
* ```js | ||
* import { foo as $ } from 'custom/helpers'; | ||
* ``` | ||
* | ||
* If the input is an ES module, `import` will be used; for CommonJS modules, | ||
* `require()` will be used. | ||
*/ | ||
}; | ||
/** | ||
* Declare the helper by importing the given function from the given module. | ||
* | ||
* Example: | ||
* ```js | ||
* { | ||
* cjsModule: 'custom/helpers.cjs', | ||
* esmModule: 'custom/helpers.mjs', | ||
* func: 'foo' | ||
* } | ||
* ``` | ||
* will produce output like: | ||
* ```js | ||
* import { foo as $ } from 'custom/helpers.mjs'; | ||
* ``` | ||
* | ||
* If the input is an ES module, `import` will be used to import `esmModule`; | ||
* likewise, for CommonJS modules, `require()` will be used to import `cjsModule`. | ||
*/ | ||
export type ImportPrivacyHelperSource = { | ||
import: { | ||
module: string; | ||
cjsModule: string; | ||
esmModule: string; | ||
func: string; | ||
}; | ||
}; | ||
export type PrivacyHelperSource = ExpressionPrivacyHelperSource | ImportPrivacyHelperSource; | ||
export interface PrivacyOptions { | ||
@@ -60,0 +71,0 @@ /** The source for the helper function used to add strings to the dictionary. */ |
{ | ||
"name": "@datadog/js-instrumentation-wasm", | ||
"type": "module", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "description": "A library for adding Datadog instrumentation to JavaScript and TypeScript code", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7670024
0.03%30692
0.06%