File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,13 @@ export class Pushy {
8282 } ;
8383 } ) ( ) ;
8484
85- constructor ( options : ClientOptions ) {
85+ constructor ( options : ClientOptions , clientType ?: 'Pushy' | 'Cresc' ) {
8686 if ( Platform . OS === 'ios' || Platform . OS === 'android' ) {
8787 if ( ! options . appKey ) {
8888 throw new Error ( 'appKey is required' ) ;
8989 }
9090 }
91- this . clientType = new . target . name as 'Pushy' | 'Cresc ';
91+ this . clientType = clientType || 'Pushy ';
9292 this . options . server = SERVER_PRESETS [ this . clientType ] ;
9393 this . setOptions ( options ) ;
9494 if ( isRolledBack ) {
@@ -521,4 +521,8 @@ export class Pushy {
521521}
522522
523523// for international users
524- export class Cresc extends Pushy { }
524+ export class Cresc extends Pushy {
525+ constructor ( options : ClientOptions ) {
526+ super ( options , 'Cresc' ) ;
527+ }
528+ }
You can’t perform that action at this time.
0 commit comments