Skip to content

Notes on use with TypeScript #124

Description

@jamesarosen

I used ember-browserify to add pkijs to a TypeScript project today. Here are some notes:

  1. add the library: yarn add pkijs --dev
  2. add the type declarations: yarn add @types/pkijs --dev
  3. add "npm:pkijs": [ "node_modules/pkijs" ], to compilerOptions.paths in tsconfig.json. This tells Typescript that when I import PKI from 'npm:pkijs', I'm getting node_modules/pkijs/src/index.js
  4. import PKI from 'npm:pkijs' in a component/route/model/...

I don't know where this information might be useful -- possibly in the README.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions