Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {Component} from 'react';
interface IDocumentTitleProps {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rename the interface DocumentTitleProps. It is not recommended to prefix interfaces with I (although its somewhat still up for debate).

title: string;
}
declare class DocumentTitle extends Component<IDocumentTitleProps, void> {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

void is not valid in newer React types. You should use {} for back and forward compatibility.

export = DocumentTitle;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.0.2",
"description": "A declarative, nested, stateful document.title for React",
"main": "index.js",
"typings": "index.d.ts",
"scripts": {
"test": "mocha",
"test:watch": "npm run test -- --watch",
Expand Down