// lib.d.ts
declare function parseInt(s: string, radix?: number): number;
declare function encodeURI(uri: string): string;
interface Object {
constructor: Function;
toString(): string;
hasOwnProperty(v: string): boolean;
isPrototypeOf(v: Object): boolean;
...
}# Install Typings CLI utility.
npm install typings --global
# Install typings.
typings install lodash --savevar foo = {};
foo.bar = '';// service.ts
module.exports = function() {
...
}// index.ts
import service from './service';import styles from './styles.css';
import template from './template.html';var styles = require('./styles.css');
var template = require('./template.html');