We are moving from SharePoint 2013 to SharePoint Online. We are thinking of migrating existing webparts in 2013, which have jquery - ajax, to SPFX client webparts. Do we have to rewrite all the code in Typescript? Or, can we inject the existing jquery ajax in Typescript?
A great reference when planning this move is
[Migrate existing customization to the SharePoint Framework] in the SharePoint Framework documentation. Unfortunately, there isn't an answer that would fit every situation.
Here's a relevant quote from that section regarding whether or not you'll need to rewrite:
Most likely you need to download and include the TypeScript definition file for jQuery—jquery.d.ts—in your project.