This commit is contained in:
NoryiE
2025-02-16 14:12:49 +00:00
parent c6a89e5b35
commit e0aeb9b06e
2737 changed files with 5220 additions and 1039045 deletions

View File

@@ -1,10 +0,0 @@
import { options, Fragment, Component } from 'preact';
export function initDevTools() {
if (typeof window != 'undefined' && window.__PREACT_DEVTOOLS__) {
window.__PREACT_DEVTOOLS__.attachPreact('10.18.1', options, {
Fragment,
Component
});
}
}

View File

@@ -1,8 +0,0 @@
/**
* Customize the displayed name of a useState, useReducer or useRef hook
* in the devtools panel.
*
* @param value Wrapped native hook.
* @param name Custom name
*/
export function addHookName<T>(value: T, name: string): T;

View File

@@ -1,15 +0,0 @@
import { options } from 'preact';
import { initDevTools } from './devtools';
initDevTools();
/**
* Display a custom label for a custom hook for the devtools panel
* @type {<T>(value: T, name: string) => T}
*/
export function addHookName(value, name) {
if (options._addHookName) {
options._addHookName(name);
}
return value;
}