module JS { export class ArrayBuffer { public bufferNativeInstance : any ; public constructor ( sizeBytes ) { if ( ! array_buffer ) { import array_buffer from 'array_buffer' ; } if ( ! array_buffer ) { throw new Error ( 'array_buffer module is not available' ) ; } const bufferNativeInstance = this . bufferNativeInstance = array_buffer . new ( sizeBytes ) ; } } }