mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
fix export (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/33748#pullrequestreview-212725106)
This commit is contained in:
parent
05438e362f
commit
32225d8a5b
19
types/vara/index.d.ts
vendored
19
types/vara/index.d.ts
vendored
@ -12,7 +12,7 @@
|
||||
* however they will not override the options set above.
|
||||
* They will work as secondary options.
|
||||
*/
|
||||
export interface TextProperties {
|
||||
interface TextProperties {
|
||||
/**
|
||||
* Size of the text
|
||||
*/
|
||||
@ -47,7 +47,7 @@ export interface TextProperties {
|
||||
letterSpacing?: number;
|
||||
}
|
||||
|
||||
export interface TextStep extends TextProperties {
|
||||
interface TextStep extends TextProperties {
|
||||
/**
|
||||
* Text to be shown
|
||||
*/
|
||||
@ -79,7 +79,7 @@ export interface TextStep extends TextProperties {
|
||||
delay?: number;
|
||||
}
|
||||
|
||||
export interface TextElements {
|
||||
interface TextElements {
|
||||
/**
|
||||
* Array of svg g elements, each representing a letter
|
||||
*/
|
||||
@ -91,9 +91,11 @@ export interface TextElements {
|
||||
container: SVGGElement;
|
||||
}
|
||||
|
||||
export default class Vara {
|
||||
constructor(queryDom: string, fontJSONSource: string,
|
||||
textStep: TextStep[], textGlobals?: TextProperties);
|
||||
declare class VaraType {
|
||||
constructor(queryDom: string,
|
||||
fontJSONSource: string,
|
||||
textStep: TextStep[],
|
||||
textGlobals?: TextProperties);
|
||||
|
||||
/**
|
||||
* Is used to execute a function when the font is loaded and the elements are created.
|
||||
@ -153,3 +155,8 @@ export default class Vara {
|
||||
|
||||
setPosition(element: SVGGElement, obj: { x?: number; y?: number }, relative?: { x: boolean; y: boolean; }): void;
|
||||
}
|
||||
|
||||
declare const Vara: typeof VaraType;
|
||||
|
||||
export = Vara;
|
||||
export as namespace Vara;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import Vara from 'vara';
|
||||
import Vara = require('vara');
|
||||
import * as Vara2 from 'vara';
|
||||
|
||||
const vara = new Vara('#root', 'font.json', [
|
||||
{
|
||||
@ -35,8 +36,10 @@ const vara = new Vara('#root', 'font.json', [
|
||||
}
|
||||
);
|
||||
|
||||
const vara2 = new Vara2('#root', 'font.json', []);
|
||||
|
||||
// $ExpectType void
|
||||
vara.ready(() => {});
|
||||
vara.ready(() => { });
|
||||
|
||||
// $ExpectType false | TextElements
|
||||
vara.get(0);
|
||||
@ -47,7 +50,7 @@ vara.draw(0);
|
||||
vara.draw(0, 1000);
|
||||
|
||||
// $ExpectType void
|
||||
vara.animationEnd((id, group) => {});
|
||||
vara.animationEnd((id, group) => { });
|
||||
|
||||
// $ExpectType void
|
||||
vara.playAll();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user