Find or Create Page
# TypeScript types for Meteor packages
## Build process changes
* as part of the meteor build process
* create if needed node_modules/meteor/<pkgname>
* place any required declarations there
## Manual Package Declarations
* package.js support to export typescript types
* `Package.info({types: ‘index.d.ts'})`
* This allows an existing package written in JS or Coffeescript for example to provide TypeScript types
## Automatic Declaration Generation
* Generate types automatically based on entry point: `import { Meteor } from ’meteor/meteor/client'`
* Issues around client/server context where parameters might differ
* tsc has a `--declaration` flag to generate the declarations
* In cases where there's an isomorphic interface this could generate challenges for typechecking
## Poll: Would people prefer?
* manually install types for Meteor packages using @types/meteor:foo:bar
* pro
you can typecheck only the types you want
* con
* manual installation of types
* extra step for package authors to provide
* automatically install typescript typing defitions based on a new parameter in Meteor package package.js: `Package.info({types: ‘index.d.ts'})`
* pro
* convenience - its automatic
* package authors don't need to have another step in the process to publish a package
* con
* maybe: extra reliance on Meteor package ecosystem
* but until we have a viable replacement it's still the best polymorphic package system for JS :)