@@ -403,29 +403,39 @@ FS.staticInit();` +
403
403
FS . FSStream = /** @constructor */ function ( ) {
404
404
this . shared = { } ;
405
405
} ;
406
- FS . FSStream . prototype = {
406
+ FS . FSStream . prototype = { } ;
407
+ Object . defineProperties ( FS . FSStream . prototype , {
407
408
object : {
409
+ /** @this {FS.FSStream} */
408
410
get : function ( ) { return this . node ; } ,
411
+ /** @this {FS.FSStream} */
409
412
set : function ( val ) { this . node = val ; }
410
413
} ,
411
414
isRead : {
415
+ /** @this {FS.FSStream} */
412
416
get : function ( ) { return ( this . flags & { { { cDefine ( 'O_ACCMODE' ) } } } ) !== { { { cDefine ( 'O_WRONLY' ) } } } ; }
413
417
} ,
414
418
isWrite : {
419
+ /** @this {FS.FSStream} */
415
420
get : function ( ) { return ( this . flags & { { { cDefine ( 'O_ACCMODE' ) } } } ) !== { { { cDefine ( 'O_RDONLY' ) } } } ; }
416
421
} ,
417
422
isAppend: {
423
+ /** @this {FS.FSStream} */
418
424
get : function ( ) { return ( this . flags & { { { cDefine ( 'O_APPEND' ) } } } ) ; }
419
425
} ,
420
426
flags : {
427
+ /** @this {FS.FSStream} */
421
428
get : function ( ) { return this . shared . flags ; } ,
429
+ /** @this {FS.FSStream} */
422
430
set : function ( val ) { this . shared . flags = val ; } ,
423
431
} ,
424
432
position : {
425
- get function ( ) { return this . shared . position ; } ,
433
+ /** @this {FS.FSStream} */
434
+ get : function ( ) { return this . shared . position ; } ,
435
+ /** @this {FS.FSStream} */
426
436
set : function ( val ) { this . shared . position = val ; } ,
427
437
} ,
428
- } ;
438
+ } ) ;
429
439
}
430
440
// clone it, so we can return an instance of FSStream
431
441
stream = Object . assign ( new FS . FSStream ( ) , stream ) ;
0 commit comments