add title v1.0.0 by tj (#9675)

* add title v1.0.0 by tj

* i made a mistake naming the file
This commit is contained in:
Fahad Hossain
2016-06-19 08:44:49 +06:00
committed by Masahiro Wakame
parent 9dba999267
commit 1d03fe4090
2 changed files with 24 additions and 0 deletions

10
title/title-tests.ts Normal file
View File

@@ -0,0 +1,10 @@
/// <reference path="./title.d.ts"/>
import title = require("title");
var document = {title: "original"};
title("newtitle"); // document.title === 'newtitle'
title("%s - %o", "new"); // document.title === 'new - original'
title.reset(); // document.title === 'original'

14
title/title.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for title v1.0.0
// Project: https://www.npmjs.com/package/title
// Definitions by: Fahad <https://github.com/fa7ad>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "title"{
function Title(newtitle: string): void;
function Title(pattern: string, newtitle?: string): void;
namespace Title {
function reset(): void;
}
export = Title;
}