From bd57336b491cc76d7835ae24324da45f3ff13224 Mon Sep 17 00:00:00 2001 From: zonr Date: Thu, 4 Jan 2018 02:16:15 +0800 Subject: [PATCH] [velocity-animate] Export a module so it can be used with "import". (#22552) The following code snippet would work nicely with the fix: import * as Velocity from 'velocity-animate'; Velocity.animate(...); Otherwise, TypeScript throws the following error: TS2307: Cannot find module 'velocity-animate'. --- types/velocity-animate/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/types/velocity-animate/index.d.ts b/types/velocity-animate/index.d.ts index 63574f7503..f6b696870f 100644 --- a/types/velocity-animate/index.d.ts +++ b/types/velocity-animate/index.d.ts @@ -6,6 +6,12 @@ /// +declare const Velocity: jquery.velocity.VelocityStatic; + +declare module "velocity-animate" { + export = Velocity; +} + interface JQuery { velocity(name: string, options: jquery.velocity.RegisteredEffectOptions): JQuery; velocity(options: {properties: jquery.velocity.Properties; options: jquery.velocity.Options}): JQuery;