Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: typedef resolution & add examples that use types #3359

Merged
merged 6 commits into from
Nov 2, 2020

Conversation

Gozala
Copy link
Contributor

@Gozala Gozala commented Oct 27, 2020

This pull request does following:

  1. addresses fix: types path for ipfs-core #3356 in a different way based no findings in require('ipfs-core') in ipfs package causes invalid typedef genration. #3358.
  2. Adds ts project example that uses ipfs and tests that it type checks.
  3. Adds js project example that uses ipfs and runs type checker to ensure types are picked up and inferred.
  4. Changes all the ReturnType<import(...)>'s to ReturnType<typeof import(...)> as former seems to raise errors in stricter TS setup.

Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

The examples both need a README.md to describe them.

You can crib from the READMEs in the other examples but they need to:

  1. Give the name of the example
  2. A one-sentence overview of what the example shows
  3. Any install instructions
  4. How to run the example
  5. What output they should expect to see
  6. What files they can edit or next steps to take to play with the example

examples/ipfs-from-ts/package.json Outdated Show resolved Hide resolved
examples/ipfs-from-ts/package.json Outdated Show resolved Hide resolved
examples/ipfs-from-typed-js/package.json Outdated Show resolved Hide resolved
examples/ipfs-from-typed-js/package.json Outdated Show resolved Hide resolved
examples/types-use-ipfs-from-ts/README.md Outdated Show resolved Hide resolved
examples/types-use-ipfs-from-typed-js/README.md Outdated Show resolved Hide resolved
Copy link
Member

@achingbrain achingbrain left a comment

Choose a reason for hiding this comment

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

Some minor typos

@achingbrain achingbrain changed the title Fixe typedef resolution & add examples that use types fix: typedef resolution & add examples that use types Nov 2, 2020
@achingbrain achingbrain merged commit dc2795a into master Nov 2, 2020
@achingbrain achingbrain deleted the gozala/fix-type-path-substitution branch November 2, 2020 12:33
SgtPooki referenced this pull request in ipfs/js-kubo-rpc-client Aug 18, 2022
1. addresses #3356 in a different way based no findings in #3358. 
2. Adds ts project example that uses ipfs and tests that it type checks.
3. Adds js project example that uses ipfs and runs type checker to ensure types are picked up and inferred.
4. Changes all the `ReturnType<import(...)>`'s to `ReturnType<typeof import(...)>` as former seems to raise errors in stricter TS setup.

Co-authored-by: achingbrain <[email protected]>
@github-actions github-actions bot mentioned this pull request Sep 21, 2022
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.

2 participants