Skip to content

Commit eb67023

Browse files
authored
Interactivity API: Add types for warn helper. (#61687)
* Add types * Type constant file
1 parent 9d62bde commit eb67023

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/interactivity/src/constants.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const directivePrefix: string = 'wp';

packages/interactivity/src/utils/warn.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const logged = new Set();
1+
const logged: Set< string > = new Set();
22

3-
export const warn = ( message ) => {
3+
export const warn = ( message: string ): void => {
44
// @ts-expect-error
55
if ( typeof SCRIPT_DEBUG !== 'undefined' && SCRIPT_DEBUG === true ) {
66
if ( logged.has( message ) ) {

0 commit comments

Comments
 (0)