Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Port Turbolinks to TypeScript #445

Merged
merged 1 commit into from Feb 13, 2019
Merged

Port Turbolinks to TypeScript #445

merged 1 commit into from Feb 13, 2019

Conversation

sstephenson
Copy link
Contributor

This pull request migrates the Turbolinks source code from CoffeeScript to TypeScript and ES modules. We plan to release this as version 5.3.0.

Why?
Basecamp's sister framework, Stimulus, is written in TypeScript, and we recently ported the Turbolinks test suite to TypeScript. This branch unifies our front-end framework development stack ahead of work on Turbolinks 6.

Do I need to change anything in my application?
Most applications won't require any changes. If you have monkey-patched Turbolinks classes or methods, those patches may no longer work. However, the public API is unchanged.

How can I test the port?
We have published a pre-release development version to npm as 5.3.0-beta.0, which you may reference in your package.json file. If you are using Sprockets, you can download the dist file from unpkg and place it in your load path.

What about existing pull requests?
Existing pull requests will need to be rewritten, but this is largely a syntactic exercise. Most classes and methods are the same.

Whither CoffeeScript?
CoffeeScript has served us well since 2012 and will always hold a special place in this author's heart. TypeScript brings an improved editing experience (to easily jump to call sites or definitions, or rename classes and methods) and explicit interfaces (to specify the API between Turbolinks and its native adapters, for example).

@sstephenson sstephenson merged commit 866a29c into master Feb 13, 2019
@sstephenson sstephenson deleted the typescript branch February 13, 2019 22:16
@domchristie domchristie mentioned this pull request Jun 14, 2019
@fieu
Copy link

fieu commented Mar 19, 2020

Hey @sstephenson,

I have a question. Does this result in any noticeable performance increases/decreases?

I understand TypeScript in the end is transpiled to JS so there should likely be not but was just wondering.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants