Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8719291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:45:32+00:00 2026-06-13T06:45:32+00:00

When using the TypeScript plugin for vs.net, how do I make one TypeScript file

  • 0

When using the TypeScript plugin for vs.net, how do I make one TypeScript file import modules declared in other TypeScript files?

file 1:

module moo
{
    export class foo .....
}

file 2:

//what goes here?

class bar extends moo.foo
{
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:45:33+00:00Added an answer on June 13, 2026 at 6:45 am

    From TypeScript version 1.8 you can use simple import statements just like in ES6:

    import { ZipCodeValidator } from "./ZipCodeValidator";
    
    let myValidator = new ZipCodeValidator();
    

    https://www.typescriptlang.org/docs/handbook/modules.html

    Old answer: From TypeScript version 1.5 you can use tsconfig.json: http://www.typescriptlang.org/docs/handbook/tsconfig-json.html

    It completely eliminates the need of the comment style referencing.

    Older answer:

    You need to reference the file on the top of the current file.

    You can do this like this:

    /// <reference path="../typings/jquery.d.ts"/>
    /// <reference path="components/someclass.ts"/>
    
    class Foo { }
    

    etc.

    These paths are relative to the current file.

    Your example:

    /// <reference path="moo.ts"/>
    
    class bar extends moo.foo
    {
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Assume the following class definition using TypeScript in Animal.ts: module Animals { export class
When using typescript do I need to import a plugin.d.ts for every external js
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
I am trying to write a file downloader in TypeScript using the FileSystem API.
If I'm loading dojo from a CDN how do I import a module using
Using import datetime in python, is it possible to take a formatted time/date string
Installing a rails plugin using the git:// protocol is easy, you just type script/plugin
Using mercurial, I've run into an odd problem where a line from one committer
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.