question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rewrite in typescript

See original GitHub issue

@all

https://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:closed
  • Created 7 years ago
  • Reactions:26
  • Comments:47 (36 by maintainers)

github_iconTop GitHub Comments

2reactions
afc163commented, Jun 29, 2016

@GrayChoi @maolion Assigned some component to you, Thx!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found