Question: I want to use typescript in ES6-compatible mode, as a partial replacement for ES6 classes, because it is quite convenient and clear compiler, comparing to traceur/sweet.js macros.

How can I compile files with `.js` extension?

`tsc src/util.js` gives `error TS5007: Cannot resolve referenced file: 'src/util.js'`, whereas `tsc src/util.ts` works just fine.

There are both `util.js` and `util.ts` in `src` directory, but I don’t want to have any `.ts` files.

Answer: 
You can't. It is intentionally not supported by the TypeScript compiler so as to avoid confusion for beginners. 

However you can use the typescript compiler api, pass in your content and get the output you can write to file yourself.
There are plugins for grunt/gulp builders: [gulp-typescript](https://github.com/sindresorhus/gulp-typescript) and [grunt-typescript](https://github.com/k-maru/grunt-typescript), which can make any sources, even non-`.ts` compiled with typescript.

Gulp-typescript implicitly uses [typestring](https://www.npmjs.org/package/typestring), which compiles any string with typescript code, and which is just a wrapper for the [typescript.api](https://github.com/sinclairzx81/typescript.api) - node.js API for typescript. Unfortunately, gulp-typescript is not fully complete - no errors logging, no compiling options, so you might need to use typescript.api straightaway.