Skip to content

Commit 25acd7e

Browse files
committed
add return type (jsdoc)
trow Error for unsupported os
1 parent 8fde29f commit 25acd7e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/v9.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@ export default class CSInterface extends CSInterfaceV8 {
2424
*
2525
* @since 8.5.0
2626
*
27-
* @return value >= 1.0f
28-
* only available for windows machine
27+
* @return {number} value >= 1.0f only available for windows machine
2928
*/
3029
getMonitorScaleFactor(): number {
3130

32-
if (navigator.appVersion.toLowerCase().indexOf("windows") >= 0) {
33-
return window.__adobe_cep__.getMonitorScaleFactor();
31+
if (navigator.appVersion.toLowerCase().indexOf("windows") === -1) {
32+
throw Error('OS not supported');
3433
}
3534

36-
return 0;
35+
return window.__adobe_cep__.getMonitorScaleFactor();
3736
}
3837

3938
/**
@@ -44,6 +43,8 @@ export default class CSInterface extends CSInterfaceV8 {
4443
* @param urlName url at which binary file is located. Local files should start with 'file://'
4544
* @param callback Optional. A callback function that returns after binary is loaded
4645
*
46+
* @return {boolean}
47+
*
4748
* @example
4849
*
4950
* To create JS binary use command ./cep_compiler test.js test.bin

0 commit comments

Comments
 (0)