[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'.
This commit is contained in:
zonr
2018-01-03 10:16:15 -08:00
committed by Mohamed Hegazy
parent 87ad3c1bcb
commit bd57336b49
+6
View File
@@ -6,6 +6,12 @@
/// <reference types="jquery" />
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;