11class Tabs {
22 public getCurrent = ( ) : Promise < chrome . tabs . Tab > => {
3- return new Promise ( resolve => {
3+ return new Promise ( ( resolve ) => {
44 chrome . tabs . getCurrent ( resolve ) ;
55 } ) ;
66 } ;
77
88 public sendMessage = < T = any > ( tabId : number , message : any , options ?: chrome . tabs . MessageSendOptions ) => {
9- return new Promise < T > ( resolve => {
9+ return new Promise < T > ( ( resolve ) => {
1010 if ( options ) {
1111 chrome . tabs . sendMessage ( tabId , message , options , resolve ) ;
1212 } else {
@@ -16,13 +16,13 @@ class Tabs {
1616 } ;
1717
1818 public executeScript = < T extends any [ ] > ( details : chrome . tabs . InjectDetails , tabId ?: number ) : Promise < T > => {
19- return new Promise ( resolve => {
19+ return new Promise ( ( resolve ) => {
2020 if ( typeof tabId === 'number' ) {
21- chrome . tabs . executeScript ( tabId , details , r => {
21+ chrome . tabs . executeScript ( tabId , details , ( r ) => {
2222 resolve ( r as T ) ;
2323 } ) ;
2424 } else {
25- chrome . tabs . executeScript ( details , r => {
25+ chrome . tabs . executeScript ( details , ( r ) => {
2626 resolve ( r as T ) ;
2727 } ) ;
2828 }
@@ -31,11 +31,11 @@ class Tabs {
3131
3232 public remove ( tabId : number | number [ ] ) {
3333 if ( Array . isArray ( tabId ) ) {
34- return new Promise ( r => {
34+ return new Promise ( ( r ) => {
3535 chrome . tabs . remove ( tabId , r ) ;
3636 } ) ;
3737 }
38- return new Promise ( r => {
38+ return new Promise ( ( r ) => {
3939 chrome . tabs . remove ( tabId as number , r ) ;
4040 } ) ;
4141 }
@@ -46,21 +46,21 @@ class Tabs {
4646 */
4747 public captureVisibleTab ( arg1 ?: chrome . tabs . CaptureVisibleTabOptions | number ) : Promise < string > {
4848 if ( typeof arg1 === 'undefined' ) {
49- return new Promise < string > ( r => {
50- chrome . tabs . captureVisibleTab ( res => {
49+ return new Promise < string > ( ( r ) => {
50+ chrome . tabs . captureVisibleTab ( ( res ) => {
5151 r ( res ) ;
5252 } ) ;
5353 } ) ;
5454 }
5555 if ( typeof arg1 === 'number' ) {
56- return new Promise < string > ( r => {
57- chrome . tabs . captureVisibleTab ( arg1 , res => {
56+ return new Promise < string > ( ( r ) => {
57+ chrome . tabs . captureVisibleTab ( arg1 , ( res ) => {
5858 r ( res ) ;
5959 } ) ;
6060 } ) ;
6161 }
62- return new Promise < string > ( r => {
63- chrome . tabs . captureVisibleTab ( arg1 , res => {
62+ return new Promise < string > ( ( r ) => {
63+ chrome . tabs . captureVisibleTab ( arg1 , ( res ) => {
6464 r ( res ) ;
6565 } ) ;
6666 } ) ;
0 commit comments