mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
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:
@@ -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, {}> { }
|
||||
@@ -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);
|
||||
|
||||
20
react-data-grid/tsconfig.json
Normal file
20
react-data-grid/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user