feat: replace scroll-touch* with generic input-event (#35531)
This commit is contained in:
parent
dfb8a2d804
commit
f82a863f65
20 changed files with 253 additions and 138 deletions
|
@ -3,10 +3,13 @@ type DeprecationHandler = (message: string) => void;
|
|||
let deprecationHandler: DeprecationHandler | null = null;
|
||||
|
||||
export function warnOnce (oldName: string, newName?: string) {
|
||||
let warned = false;
|
||||
const msg = newName
|
||||
return warnOnceMessage(newName
|
||||
? `'${oldName}' is deprecated and will be removed. Please use '${newName}' instead.`
|
||||
: `'${oldName}' is deprecated and will be removed.`;
|
||||
: `'${oldName}' is deprecated and will be removed.`);
|
||||
}
|
||||
|
||||
export function warnOnceMessage (msg: string) {
|
||||
let warned = false;
|
||||
return () => {
|
||||
if (!warned && !process.noDeprecation) {
|
||||
warned = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue