This is an automated email from the ASF dual-hosted git repository.
janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-vibration.git
The following commit(s) were added to refs/heads/master by this push:
new 29a7fc4 fix(typescript): update types (#75)
29a7fc4 is described below
commit 29a7fc4e598e471a6592f64cf8c0f5f095700667
Author: Tim Brust <[email protected]>
AuthorDate: Wed Feb 13 21:41:31 2019 +0100
fix(typescript): update types (#75)
* deletes removed features
* adds version number
* format code
This is part of https://github.com/apache/cordova/issues/39
<!--
Please make sure the checklist boxes are all checked before submitting the
PR. The checklist
is intended as a quick reference, for complete details please see our
Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Platforms affected
n/a - development with TypeScript
### What does this PR do?
updates typings as discussed in https://github.com/apache/cordova/issues/39
### What testing has been done on this change?
### Checklist
- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html)
in the JIRA database
- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform
affected.
- [ ] Added automated test coverage as appropriate for this change.
---
types/index.d.ts | 47 +++++++++++------------------------------------
1 file changed, 11 insertions(+), 36 deletions(-)
diff --git a/types/index.d.ts b/types/index.d.ts
index 647c167..234224b 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -1,45 +1,20 @@
-// Type definitions for Apache Cordova Vibration plugin
+// Type definitions for cordova-plugin-vibration 3.1
// Project: https://github.com/apache/cordova-plugin-vibration
-// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>,
Louis Lagrange <https://github.com/Minishlink/>
+// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
+// Louis Lagrange <https://github.com/Minishlink>
+// Tim Brust <https://github.com/timbru31>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-//
-// Copyright (c) Microsoft Open Technologies Inc
-// Licensed under the MIT license.
interface Navigator {
- /**
- * Vibrates the device for the specified amount of time.
- * @param time Milliseconds to vibrate the device. 0 cancels the
vibration. Ignored on iOS.
- */
- vibrate(time: number): void;
-
/**
- * Vibrates the device with a given pattern.
- * @param time Sequence of durations (in milliseconds) for which to
turn on or off the vibrator. Ignored on iOS.
- */
- vibrate(time: number[]): void;
-}
-
-interface Notification {
- /**
- * Vibrates the device for the specified amount of time.
- * @param time Milliseconds to vibrate the device. Ignored on iOS.
- * @deprecated
- */
+ * Vibrates the device for the specified amount of time.
+ * @param time Milliseconds to vibrate the device. 0 cancels the
vibration. Ignored on iOS.
+ */
vibrate(time: number): void;
+
/**
* Vibrates the device with a given pattern.
- * @param number[] pattern Pattern with which to vibrate the device.
- * The first value - number of milliseconds to
wait before turning the vibrator on.
- * The next value - the number of milliseconds for
which to keep the vibrator on before turning it off.
- * @param number repeat Optional index into the pattern array at which
to start repeating (will repeat until canceled),
- * or -1 for no repetition (default).
- * @deprecated
- */
- vibrateWithPattern(pattern: number[], repeat: number): void;
- /**
- * Immediately cancels any currently running vibration.
- * @deprecated
+ * @param time Sequence of durations (in milliseconds) for which to turn
on or off the vibrator. Ignored on iOS.
*/
- cancelVibration(): void;
-}
\ No newline at end of file
+ vibrate(time: number[]): void;
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]