rewrite in typescript
See original GitHub issuehttps://www.typescriptlang.org/docs/handbook/basic-types.html
demo: https://github.com/ant-design/ant-design/blob/master/components/affix/index.tsx recommended IDE: visual studio code / idea
steps
env
npm i typings -g
typings install
move types in index.d.ts to components/xx/index.tsx
change react import
import React from 'react';
import ReactDOM from 'react-dom';
to
import * as React from 'react';
import * as ReactDOM from 'react-dom';
add reference to components/index.tsx
import Xx from './xx';
export { Xx };
npm run ts-lint
delete index.d.ts
change index.js to
module.export = require('./src/');
console.warn('you are ....')
components
- --------- @afc163 ---------
- affix
- alert
- badge
- breadcrumb
- button
- card
- --------- @benjycui ---------
- calendar
- --------- @RaoHai ---------
- checkbox
- collapse
- dropdown
- form
- --------- @benjycui ---------
- date-picker
- icon
- input
- input-number
- layout
- --------- @ddcat1115 ---------
- locale-provider
- menu
- message
- modal
- notification
- pagination
- popconfirm
- popover
- progress
- radio
- --------- @benjycui ---------
- rate
- select
- slider
- spin
- steps
- switch
- table
- --------- @bang88 ---------
- tabs
- tag
- time-picker
- timeline
- tooltip
- --------- @GrayChoi ---------
- transfer
- tree
- carousel
- cascader
- --------- @afc163 ---------
- tree-select
- upload
- Make sure no tsc errors (Add tsc into
npm run lint
) - delete index.d.ts
- change index.js to …
This will close #973
Issue Analytics
- State:
- Created 7 years ago
- Reactions:26
- Comments:47 (36 by maintainers)
Top Results From Across the Web
How I rewrote our codebase to TypeScript in a week - Medium
How a developer rewrote an application from JavaScript to TypeScript and how you can do the same.
Read more >Rewriting TypeScript in Rust? You'd have to be...
Rewriting tsc in a native language, like Rust, could speed it up immensely ... Rewriting a library like TypeScript is extremely challenging.
Read more >Rewrite in TypeScript useful? : r/javascript - Reddit
I was thinking if a rewrite in TypeScript would help me on managing the growing app a little better and if it's worth...
Read more >Documentation - Migrating from JavaScript - TypeScript
Converting a JavaScript codebase over to TypeScript is, while somewhat tedious, usually not challenging. In this tutorial, we're going to look at how...
Read more >Any plan/interest to rewrite in TypeScript? · Issue #321 - GitHub
Seeing that got is now 100% typescript, is there any plan or ongoing effort on porting ... The Got rewrite to TS ended...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@GrayChoi @maolion Assigned some component to you, Thx!
@ziaochina https://github.com/ant-design/ant-design/issues/973