diff --git a/types/angular-tooltips/angular-tooltips-tests.ts b/types/angular-tooltips/angular-tooltips-tests.ts new file mode 100644 index 0000000000..5b89ec363f --- /dev/null +++ b/types/angular-tooltips/angular-tooltips-tests.ts @@ -0,0 +1,21 @@ +import * as angular from 'angular'; +import * as angularTooltips from 'angular-tooltips'; + +angular + .module('test.angular-tooltips', [ + angularTooltips + ]) + .config((tooltipsConfProvider: angularTooltips.TooltipsConfProvider) => { + tooltipsConfProvider.configure({ + side: 'left', + showTrigger: 'click', + hideTrigger: 'click', + class: 'class', + smart: true, + closeButton: false, + size: 'small', + speed: 'slow', + tooltipTemplateUrlCache: true, + show: false + }); + }); diff --git a/types/angular-tooltips/index.d.ts b/types/angular-tooltips/index.d.ts new file mode 100644 index 0000000000..d3cf83c1ec --- /dev/null +++ b/types/angular-tooltips/index.d.ts @@ -0,0 +1,26 @@ +// Type definitions for angular-tooltips 1.2 +// Project: http://720kb.github.io/angular-tooltips +// Definitions by: Leonard Thieu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare const AngularTooltips: '720kb.tooltips'; +export = AngularTooltips; + +declare namespace AngularTooltips { + interface TooltipsConfProvider { + configure(options: TooltipsConfProviderOptions): void; + } + + interface TooltipsConfProviderOptions { + side?: 'left' | 'right' | 'top' | 'bottom' | 'top left' | 'top right' | 'bottom left' | 'bottom right'; + showTrigger?: string; + hideTrigger?: string; + class?: string; + smart?: boolean; + closeButton?: boolean; + size?: 'small' | 'medium' | 'large'; + speed?: 'slow' | 'medium' | 'fast'; + tooltipTemplateUrlCache?: boolean; + show?: boolean; + } +} diff --git a/types/angular-tooltips/tsconfig.json b/types/angular-tooltips/tsconfig.json new file mode 100644 index 0000000000..945fa84c71 --- /dev/null +++ b/types/angular-tooltips/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "angular-tooltips-tests.ts" + ] +} diff --git a/types/angular-tooltips/tslint.json b/types/angular-tooltips/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/angular-tooltips/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}