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

Add types declaration file #2

Merged
merged 1 commit into from
Dec 30, 2020
Merged

Add types declaration file #2

merged 1 commit into from
Dec 30, 2020

Conversation

geopic
Copy link
Contributor

@geopic geopic commented Dec 21, 2020

Resolves #1. Let me know if there are any issues.

@srebughini
Copy link
Owner

Hey,

I don't know how it works in TypeScript, but:

  • GasMixtureComposition: getMassFraction, getMoleFraction and getMixtureDiffusion are 1d-array (N, where N is the number of spiecies).
  • GasMixture: getMassFraction, getMoleFraction and getMixtureDiffusion are 1d-array (N, where N is the number of spiecies). And getBinaryDiffusion is a 2d-array (NxN, where N is the number of species).

Is the type number still the right one even for arrays?

@geopic
Copy link
Contributor Author

geopic commented Dec 29, 2020

Noted, I'll correct it now. And if the one-dimensional arrays are arrays of numbers then the correct way to label it in TS is number[] or Array<number>, both are right ways to do it

@srebughini srebughini merged commit 00a2bd9 into srebughini:main Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript type declaration file
2 participants