Remove <reference path="../xxx/xxx.d.ts"> from definitions files and replace it with import * as Xxx from "xxx" or <reference types="xxx"/>

This commit is contained in:
Andy Hanson
2016-09-14 12:12:01 -07:00
parent 84a760de85
commit 28ef3d201b
474 changed files with 5552 additions and 3078 deletions

View File

@@ -3,12 +3,9 @@
// Definitions by: Simon Gellis <https://github.com/SupernaviX>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../react/react.d.ts" />
/// <reference types="react" />
declare namespace AdazzleReactDataGrid {
import React = __React;
interface GridProps {
/**
* Gets the data to render in each row. Required.
@@ -248,7 +245,7 @@ declare namespace AdazzleReactDataGrid {
* @param ev The react event
* @param args The row and column coordinates of the cell, and the name of the event.
*/
(ev: React.SyntheticEvent, args: {rowIdx: number, idx: number, name: string}): void
(ev: React.SyntheticEvent<any>, args: {rowIdx: number, idx: number, name: string}): void
}
/**
@@ -314,7 +311,7 @@ declare namespace AdazzleReactDataGrid {
/**
* The double click event.
*/
e: React.SyntheticEvent
e: React.SyntheticEvent<any>
}
/**
@@ -414,8 +411,6 @@ declare namespace AdazzleReactDataGrid {
}
declare namespace AdazzleReactDataGridPlugins {
import React = __React;
// TODO: refine types for these addons
export namespace Editors {
export class AutoComplete extends React.Component<any, {}> { }

View File

@@ -1,11 +1,7 @@
/// <reference path="./react-data-grid.d.ts" />
/// <reference path="../react/react.d.ts" />
/// <reference path="../faker/faker.d.ts" />
import * as React from 'react';
import * as ReactDataGrid from 'react-data-grid';
import * as ReactDataGridPlugins from 'react-data-grid/addons';
import * as faker from 'faker';
import faker = require('faker');
var Editors = ReactDataGridPlugins.Editors;
var Toolbar = ReactDataGridPlugins.Toolbar;
@@ -202,7 +198,7 @@ class Example extends React.Component<any, any> {
getColumns() {
var clonedColumns = columns.slice();
clonedColumns[2].events = {
onClick: function (ev:React.SyntheticEvent, args:{idx:number, rowIdx:number}) {
onClick: function (ev:React.SyntheticEvent<any>, args:{idx:number, rowIdx:number}) {
var idx = args.idx;
var rowIdx = args.rowIdx;
this.refs.grid.openCellEditor(rowIdx, idx);

View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"strictNullChecks": false,
"baseUrl": "../",
"jsx": "react",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"react-data-grid-tests.tsx"
]
}