Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Support for in-browser type-checking #123

@frankwallis

Description

@frankwallis

I am the maintainer of plugin-typescript which is the systemjs typescript plugin. The plugin currently supports type-checking in the browser when using /// <reference /> as it is able to load all the declaration files and feed them to the compiler. This provides quite a nice workflow for small projects as no bundler is required.

With the introduction of 'typings' there is a bit of a problem because from the browser it is very difficult to locate the typings file or even know whether it exists. As you know the algorithm for finding a typings file can involve searching a directory (for reference it's here). What you need in the browser is a prepopulated map of module name to typings file, something like:

   "angular2": {
        "default": "./typings/browser/angular2/angular2.d.ts",
         "router": "./typings/browser/angular2/router.d.ts",
    },
    "rxjs": "./typings/browser/rxjs/rxjs.d.ts"

So I was wondering if there is any way I can get this information using the typings project, or if you would consider outputting this information into typings.json if it is already available? If you think it's going to be possible then I am more than happy to create a pull request. This is actually a real problem for me at the moment, so any help would be much appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions