Skip to content
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

Port from flow to Typescript #52

Merged
merged 35 commits into from
Jul 6, 2019
Merged

Conversation

crucialfelix
Copy link
Owner

@crucialfelix crucialfelix commented Jul 5, 2019

Converts all files to .ts and changes the typing from flow annotations to TypeScript.

The library is now usable with JavaScript or TypeScript. When using VSCode you get intelligent error checking and auto-completion even when using JS.

The API remains the same. The published JS is the same interface. AFAICT nothing breaks.

Fixes #44

This will be reworked and cleaned up further
# This is the 1st commit message:

Allocators

# The commit message #2 will be skipped:

# fixup! 1b99594
Turns off smoke test msg tests - typing eliminates those
dryadic library is not yet typed, so typing is not very strict here.
Will rework this later.
@@ -0,0 +1,23 @@
declare module "dryadic" {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dryadic will also be ported to Typescript. Afterwards this declaration file will be removed.

src/scapi.ts Outdated Show resolved Hide resolved
@@ -142,7 +140,7 @@ class Buffer {
/**
* Deallocate the Buffer, freeing memory on the server.
*/
free(): Promise<number> {
Copy link
Owner Author

@crucialfelix crucialfelix Jul 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old version was incorrectly typed. it returns void

import { MsgType, CallAndResponse } from "../../Types";
import Server from "../../server/server";

interface Properties {}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this Properties? It's not really used here. Purpose is unclear.

…s missing

This allows you to install from git source, not just from npm
Typescript esModuleInterop works fine for lodash
@crucialfelix crucialfelix force-pushed the feature/flow-to-typescript branch from 8e893a0 to 0931a25 Compare July 5, 2019 17:27
src/dryads/AudioBus.ts Outdated Show resolved Hide resolved
@crucialfelix crucialfelix force-pushed the feature/flow-to-typescript branch from e516c89 to 7b4914e Compare July 6, 2019 17:34
@crucialfelix crucialfelix merged commit 7bf3fdf into develop Jul 6, 2019
@crucialfelix crucialfelix deleted the feature/flow-to-typescript branch October 20, 2019 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port source code to Typescript. Will remain interoperable with JavaScript
1 participant