Absolutely!
While you have the option to declare modules on your own, managing module names can become challenging when using relative paths:
declare module "custom/OpenLayers-combined" {
var ol: any;
export = ol;
}
Let's take a look at the TSC options available today:
Version 2.3.1
Syntax: tsc [options] [file ...]
Examples: tsc hello.ts
tsc --out file.js file.ts
tsc @args.txt
Options:
--allowJs Permit javascript files for compilation.
--allowSyntheticDefaultImports Enable default imports from modules without default exports. This does not impact code generation, only type checking.
--allowUnreachableCode No error reporting on unreachable code.
--allowUnusedLabels No error reporting on unused labels.
-d, --declaration Generate corresponding '.d.ts' file.
--experimentalDecorators Activate experimental support for ES7 decorators.
--forceConsistentCasingInFileNames Prohibit inconsistently-cased references to the same file.
-h, --help Display this message.
--init Set up a TypeScript project and create a tsconfig.json file.
--jsx KIND Specify JSX code generation: 'preserve' or 'react'
--mapRoot LOCATION Specify where the debugger should find map files instead of generated locations.
-m KIND, --module KIND Define module code generation: 'commonjs', 'amd', 'system', 'umd', or 'es2015'
--moduleResolution Determine module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).
--newLine NEWLINE Set end of line sequence for emitted files: 'CRLF' (dos) or 'LF' (unix).
--noEmit Suppress output.
--noEmitOnError Do not generate output if errors are reported.
--noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement.
--noImplicitAny Raise error for expressions and declarations with implied 'any' type.
--noImplicitReturns Error report when function does not return a value in all code paths.
--noImplicitUseStrict Omit 'use strict' directives in module output.
--outDir DIRECTORY Redirect output structure to directory.
--outFile FILE Concatenate and emit output to single file.
--preserveConstEnums Preserve const enum declarations in generated code.
--pretty KIND Customize errors and messages using color and context. (experimental)
-p DIRECTORY, --project DIRECTORY Compile the project in specified directory.
--reactNamespace Indicate object invoked for createElement and __spread when targeting 'react' JSX emit
--removeComments Do not include comments in output.
--rootDir LOCATION Set root directory of input files to control output directory structure with --outDir argument.
--sourceMap Generate corresponding '.map' file.
--sourceRoot LOCATION Define location where debugger should locate TypeScript files instead of source locations.
--suppressImplicitAnyIndexErrors Curb noImplicitAny errors for indexing objects lacking index signatures.
-t VERSION, --target VERSION Choose ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)
-v, --version Print compiler version.
-w, --watch Monitor input files.
@<file> Include command line options and files from a file.
Note the significance of setting noEmitOnError to true. Without this, even invalid TypeScript code will compile to JavaScript.