foundation-sites: Typings file not detected

What should happen?

The typings file should be detected.

What happens instead?

Receiving errors that the typing file cannot be found and should declare one

ERROR in src/client/foundation.ts(23,21):
TS7016: Could not find a declaration file for module 'foundation-sites/js/foundation.orbit'. 'node_modules/foundation-sites/js/foundation.orbit.js' implicitly has an 'any' type.
  Try `npm install @types/foundation-sites` if it exists or add a new declaration (.d.ts) file containing `declare module 'foundation-sites';

Possible Solution

Unknown. Typings file does exist but not being picked up for some reason.

Test Case and/or Steps to Reproduce

Test Case: Unable to provide a valid test case using code pen.

How to reproduce:

  1. Create a file called foundation.ts
  2. Add the contents of https://github.com/zurb/foundation-zurb-template/blob/master/src/assets/js/lib/foundation-explicit-pieces.js to the file
  3. Note the ide identifies that the typings definitions file is not found.

Context

Typescript is throwing errors though it does not officially cause a build to break. Ideally no errors should be thrown.

Your Environment

  • Foundation version(s) used: 6.4.4-RC1
  • Browser(s) name and version(s): N/a
  • Operating System and version (desktop or mobile): Desktop MacOs 10.13.4
  • Node: 8.11.1
  • npm: 5.6.0
  • yarn: 1.6.0
  • typescript: 2.8.3

Checklist (all required):

  • I have read and follow the CONTRIBUTING.md document.
  • There are no other issues similar to this one.
  • The issue title is descriptive.
  • The template is correctly filled.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 15 (13 by maintainers)

Most upvoted comments

A PR or this was merged this week.