Skip to content

Commit 352ad8a

Browse files
committed
refactor(Ionic framework): update ionic.Platform.ready callback to accept any return
To be more generic, the ionic.Platform.ready callback has been updated to accept any return.
1 parent bba57a4 commit 352ad8a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ionic/ionic-tests.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,10 @@ class IonicTestController {
371371
* ionic.Platform
372372
*/
373373
private testStaticPlaform(): void {
374-
var ready: void = ionic.Platform.ready(function() {
375-
});
374+
var callbackWithoutReturn: ()=>void;
375+
var callbackWithReturn: ()=>boolean;
376+
var ready: void = ionic.Platform.ready(callbackWithoutReturn);
377+
ready = ionic.Platform.ready(callbackWithReturn);
376378
var setGrade: void = ionic.Platform.setGrade('iOS');
377379
var deviceInformation: string = ionic.Platform.device();
378380
var isWebView: boolean = ionic.Platform.isWebView();

ionic/ionic.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface IonicStatic {
2121
* Please remember that Cordova features (Camera, FileSystem, etc) still
2222
* will not work in a web browser.
2323
*/
24-
ready(callback: ()=>void): void;
24+
ready(callback: ()=>any): void;
2525
/**
2626
* Set the grade of the device: ‘a’, ‘b’, or ‘c’. ‘a’ is the best
2727
* (most css features enabled), ‘c’ is the worst. By default, sets the grade

0 commit comments

Comments
 (0)