Skip to content

WIP: Typescript #795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { FormGroup, FormLabel, TextField } from '@material-ui/core';
import React from 'react';
import ReactDOM from 'react-dom';
import MUIDataTable from '../../src';
import { MUIDataTableOptions } from '../../src/MUIDataTableOptions';
import { MUIDataTableColumnDef } from '../../src/MUIDataTableProps';

class Example extends React.Component {
render() {
const columns = [
const columns: MUIDataTableColumnDef[] = [
{
name: 'Name',
options: {
Expand Down Expand Up @@ -137,7 +139,7 @@ class Example extends React.Component {
['Mason Ray', 'Computer Scientist', 'San Francisco', 39, '$142,000'],
];

const options = {
const options: MUIDataTableOptions = {
filter: true,
filterType: 'dropdown',
responsive: 'scroll',
Expand Down
15,040 changes: 9,217 additions & 5,823 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server -d --progress --colors",
"test": "mocha --require babel-register test/**/*.test.js",
"test": "mocha --require ts-node/register test/**/*.test.js",
"docs:dev": "next docs",
"docs:build": "cross-env NODE_ENV=production next build docs",
"docs:export": "next export docs -o docs/export",
Expand Down Expand Up @@ -39,6 +39,12 @@
"devDependencies": {
"@material-ui/core": "^3.2.0",
"@material-ui/icons": "^3.0.1",
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/lodash": "^4.14.136",
"@types/react": "^16.8.23",
"@types/react-dom": "^16.8.5",
"awesome-typescript-loader": "^5.2.1",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.3",
Expand Down Expand Up @@ -82,8 +88,12 @@
"rollup-plugin-uglify": "^3.0.0",
"simulant": "^0.2.2",
"sinon": "^4.1.3",
"webpack": "^3.9.1",
"webpack-dev-server": "^2.9.5"
"source-map-loader": "^0.2.4",
"ts-node": "^8.3.0",
"typescript": "^3.5.3",
"webpack": "^4.38.0",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.7.2"
},
"peerDependencies": {
"@material-ui/core": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import replace from 'rollup-plugin-replace';
import uglify from 'rollup-plugin-uglify';

export default {
input: 'src/index.js',
input: 'src/index.ts',
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
Expand Down
Loading