okwolf / hyperapp-fx

Effects for use with Hyperapp
MIT License
115 stars 17 forks source link

Create index.d.ts #36

Closed Frikki closed 5 years ago

Frikki commented 6 years ago

Add TypeScript declaration file.

Close #35

codecov[bot] commented 6 years ago

Codecov Report

Merging #36 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #36   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           6      6           
  Lines         141    141           
  Branches       15     15           
=====================================
  Hits          141    141

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 80d20cb...199b2a9. Read the comment docs.

okwolf commented 6 years ago

Shouldn't there also be "typings": "index.d.ts" added to package.json?

Hyperapp has this.

Frikki commented 6 years ago

Yes. A field in package.json, such as types, is helpful as mentioned here: http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

Note that typings and types are synonymous.

However, it is my understanding that newer versions of TypeScript don’t need this field to locate the packages, but I cannot find the information of that anymore. For good measure, let’s add the field.

okwolf commented 6 years ago

@Frikki how can I give this a try? I checked out your branch but I didn't see any improved IntelliSense. Does this only work when using @hyperapp/fx from node_modules?

Frikki commented 6 years ago

@okwolf If you make a symlink, then you could test it without actually publishing it first. See here: https://yarnpkg.com/lang/en/docs/cli/link/

okwolf commented 5 years ago

My focus has now shifted to v2 FX. Feel free to submit a new PR after HAv2 is merged to master.

Closes #35.