We are glad to announce, that in the latest release we added support for Typescript programming language into BrainFlow. Thanks Gordon Preumont for the help with it!

So, now you can download this package from npm and use it to build your own apps on top of it. Detailed installation instructions can be found at BrainFlow docs.

Here is a well known brainflow get data example adopted for Typescript:

import {BoardIds, BoardShim} from 'brainflow';

function sleep (ms: number)
{
    return new Promise ((resolve) => { setTimeout (resolve, ms); });
}

async function runExample (): Promise<void>
{
    const board = new BoardShim (BoardIds.SYNTHETIC_BOARD, {});
    board.prepareSession();
    board.startStream();
    await sleep (3000);
    board.stopStream();
    const data = board.getBoardData();
    board.releaseSession();
    console.info('Data');
    console.info(data);
}

runExample ();

More code samples can be found here.

You are welcome to give it a try and report issues if any via BrainFlow slack workspace or Github issues.