@@ -237,120 +237,114 @@ interface DOMPurify {
237237 /**
238238 * Provides core sanitation functionality.
239239 *
240- * @param { string | Node } dirty string or DOM node
241- * @param { Config & { RETURN_TRUSTED_TYPE: true } } cfg object
242- * @returns { TrustedHTML } Sanitized TrustedHTML.
240+ * @param dirty string or DOM node
241+ * @param cfg object
242+ * @returns Sanitized TrustedHTML.
243243 */
244244 sanitize ( dirty : string | Node , cfg : Config & {
245245 RETURN_TRUSTED_TYPE : true ;
246246 } ) : TrustedHTML ;
247247 /**
248248 * Provides core sanitation functionality.
249249 *
250- * @param { Node } dirty DOM node
251- * @param { Config & { IN_PLACE: true } } cfg object
252- * @returns { Node } Sanitized DOM node.
250+ * @param dirty DOM node
251+ * @param cfg object
252+ * @returns Sanitized DOM node.
253253 */
254254 sanitize ( dirty : Node , cfg : Config & {
255255 IN_PLACE : true ;
256256 } ) : Node ;
257257 /**
258258 * Provides core sanitation functionality.
259259 *
260- * @param { string | Node } dirty string or DOM node
261- * @param { Config & { RETURN_DOM: true } } cfg object
262- * @returns { Node } Sanitized DOM node.
260+ * @param dirty string or DOM node
261+ * @param cfg object
262+ * @returns Sanitized DOM node.
263263 */
264264 sanitize ( dirty : string | Node , cfg : Config & {
265265 RETURN_DOM : true ;
266266 } ) : Node ;
267267 /**
268268 * Provides core sanitation functionality.
269269 *
270- * @param { string | Node } dirty string or DOM node
271- * @param { Config & { RETURN_DOM_FRAGMENT: true } } cfg object
272- * @returns { DocumentFragment } Sanitized document fragment.
270+ * @param dirty string or DOM node
271+ * @param cfg object
272+ * @returns Sanitized document fragment.
273273 */
274274 sanitize ( dirty : string | Node , cfg : Config & {
275275 RETURN_DOM_FRAGMENT : true ;
276276 } ) : DocumentFragment ;
277277 /**
278278 * Provides core sanitation functionality.
279279 *
280- * @param { string | Node } dirty string or DOM node
281- * @param { Config } cfg object
282- * @returns { string } Sanitized string.
280+ * @param dirty string or DOM node
281+ * @param cfg object
282+ * @returns Sanitized string.
283283 */
284284 sanitize ( dirty : string | Node , cfg ?: Config ) : string ;
285285 /**
286286 * Checks if an attribute value is valid.
287287 * Uses last set config, if any. Otherwise, uses config defaults.
288288 *
289- * @param { string } tag Tag name of containing element.
290- * @param { string } attr Attribute name.
291- * @param { string } value Attribute value.
292- * @returns { boolean } Returns true if `value` is valid. Otherwise, returns false.
289+ * @param tag Tag name of containing element.
290+ * @param attr Attribute name.
291+ * @param value Attribute value.
292+ * @returns Returns true if `value` is valid. Otherwise, returns false.
293293 */
294294 isValidAttribute ( tag : string , attr : string , value : string ) : boolean ;
295295 /**
296296 * Adds a DOMPurify hook.
297297 *
298- * @param {BasicHookName } entryPoint entry point for the hook to add
299- * @param {Hook } hookFunction function to execute
300- * @returns {void }
298+ * @param entryPoint entry point for the hook to add
299+ * @param hookFunction function to execute
301300 */
302301 addHook ( entryPoint : BasicHookName , hookFunction : Hook ) : void ;
303302 /**
304303 * Adds a DOMPurify hook.
305304 *
306- * @param {'uponSanitizeElement' } entryPoint entry point for the hook to add
307- * @param {UponSanitizeElementHook } hookFunction function to execute
308- * @returns {void }
305+ * @param entryPoint entry point for the hook to add
306+ * @param hookFunction function to execute
309307 */
310308 addHook ( entryPoint : 'uponSanitizeElement' , hookFunction : UponSanitizeElementHook ) : void ;
311309 /**
312310 * Adds a DOMPurify hook.
313311 *
314- * @param {'uponSanitizeAttribute' } entryPoint entry point for the hook to add
315- * @param {UponSanitizeAttributeHook } hookFunction function to execute
316- * @returns {void }
312+ * @param entryPoint entry point for the hook to add
313+ * @param hookFunction function to execute
317314 */
318315 addHook ( entryPoint : 'uponSanitizeAttribute' , hookFunction : UponSanitizeAttributeHook ) : void ;
319316 /**
320317 * Remove a DOMPurify hook at a given entryPoint
321318 * (pops it from the stack of hooks if more are present)
322319 *
323- * @param { BasicHookName } entryPoint entry point for the hook to remove
324- * @returns { Hook | undefined } removed(popped) hook
320+ * @param entryPoint entry point for the hook to remove
321+ * @returns removed(popped) hook
325322 */
326323 removeHook ( entryPoint : BasicHookName ) : Hook | undefined ;
327324 /**
328325 * Remove a DOMPurify hook at a given entryPoint
329326 * (pops it from the stack of hooks if more are present)
330327 *
331- * @param { 'uponSanitizeElement' } entryPoint entry point for the hook to remove
332- * @returns { UponSanitizeElementHook | undefined } removed(popped) hook
328+ * @param entryPoint entry point for the hook to remove
329+ * @returns removed(popped) hook
333330 */
334331 removeHook ( entryPoint : 'uponSanitizeElement' ) : UponSanitizeElementHook | undefined ;
335332 /**
336333 * Remove a DOMPurify hook at a given entryPoint
337334 * (pops it from the stack of hooks if more are present)
338335 *
339- * @param { 'uponSanitizeAttribute' } entryPoint entry point for the hook to remove
340- * @returns { UponSanitizeAttributeHook | undefined } removed(popped) hook
336+ * @param entryPoint entry point for the hook to remove
337+ * @returns removed(popped) hook
341338 */
342339 removeHook ( entryPoint : 'uponSanitizeAttribute' ) : UponSanitizeAttributeHook | undefined ;
343340 /**
344341 * Removes all DOMPurify hooks at a given entryPoint
345342 *
346- * @param {HookName } entryPoint entry point for the hooks to remove
347- * @returns {void }
343+ * @param entryPoint entry point for the hooks to remove
348344 */
349345 removeHooks ( entryPoint : HookName ) : void ;
350346 /**
351347 * Removes all DOMPurify hooks.
352- *
353- * @returns {void }
354348 */
355349 removeAllHooks ( ) : void ;
356350}
0 commit comments