extract mode from brackets-typescript