Jump to content
Search Community

Visual Studio (NOT Visual Studio Code) & GSAP

f_lande test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Hi everybody,

completely new to GSAP, so I'm still trying to make head and tail out of it.

I see that there's a lot of stuff for strange environments I don't know absolutely anything about, but I could find nothing about a simple and plain "Hello world" project with Visual Studio, Typescript and GSAP.

Is there anybody who has ever developed anything like this? I did try, but as soon as I try to import GSAP in my Typescript projects, I get tens of errors about undeclared names and namespaces from the "gsap-core.d.ts" Typescript types description file:

 

Build started...
1>------ Build started: Project: WebApp, Configuration: Debug Any CPU ------
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(4,7): error TS2304: Build:Cannot find name 'Ease'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(5,7): error TS2304: Build:Cannot find name 'EasePack'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(6,7): error TS2304: Build:Cannot find name 'ExpoScaleEase'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(8,7): error TS2304: Build:Cannot find name 'RoughEase'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(9,7): error TS2304: Build:Cannot find name 'SteppedEase'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(10,7): error TS2304: Build:Cannot find name 'VelocityTracker'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(11,14): error TS2304: Build:Cannot find name 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(12,14): error TS2304: Build:Cannot find name 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(13,14): error TS2304: Build:Cannot find name 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(14,14): error TS2304: Build:Cannot find name 'Draggable'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(15,14): error TS2304: Build:Cannot find name 'GSDevTools'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(16,14): error TS2304: Build:Cannot find name 'MotionPathHelper'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(17,14): error TS2304: Build:Cannot find name 'SplitText'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(18,14): error TS2304: Build:Cannot find name 'Flip'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(19,14): error TS2304: Build:Cannot find name 'ScrollTrigger'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(72,20): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(114,47): error TS2503: Build:Cannot find namespace 'utils'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(118,35): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(144,21): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(155,35): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(160,25): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(210,76): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(225,76): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(240,57): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(255,74): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(271,82): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(286,100): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(303,30): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(335,69): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(393,37): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(393,52): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(429,45): error TS2304: Build:Cannot find name 'EaseFunction'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(484,56): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(494,43): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(509,55): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(524,73): error TS2503: Build:Cannot find namespace 'core'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(550,38): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(556,37): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(562,41): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(568,40): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(579,39): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(585,38): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(591,42): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
1>E:\Home\Francesco\ElCenter\OnLine\PixiJs\27_Tweening\WebApp\node_modules\gsap\types\gsap-core.d.ts(597,41): error TS2339: Build:Property 'core' does not exist on type 'typeof gsap'.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Any help would be welcome!!

 

Thanks,

 

f_lande

Link to comment
Share on other sites

Hi Cassie,

I'm including PIXI and GSAP in one of my TypeScript files like this:

 

/// <reference path = "pixi.js.d.ts"/>
/// <reference path = "../node_modules/gsap/types/gsap-core.d.ts"/>
 

and about PIXI alone, no problem, but as soon as I try to add GSAP I get over 40 errors, so I really don't know how to proceed.

Any hint is welcome!!

 

Thanks

Link to comment
Share on other sites

  • Solution

Are you actually importing gsap, like import { gsap } from "gsap" or using <script src="">? When doing import { gsap } from "gsap", the definitions should automatically be included.

 

You usually don't need to do <reference> for definitions like that. That's what a tsconfig file is for.

https://www.typescriptlang.org/docs/handbook/tsconfig-json.html

 

If something is missing, you can usually just add to the tsconfig.

{
  "compilerOptions": {
    ...
  },
  "files": [
    "node_modules/gsap/types/index.d.ts"
  ]
}

 

 

Link to comment
Share on other sites

Hi all,

I found the problem. I was wrongfully including the type libraries file like this:

 

/// <reference path = "../node_modules/gsap/types/gsap-core.d.ts"/>

 

and not like this:

 

/// <reference path = "../node_modules/gsap/types/index.d.ts"/>

 

I just don't think I saw it written anywhere, but I may be wrong here. I'm not using "tsconfig.json" file whatsoever,

don't know what it is for, or where it should be placed.

 

I kindly ask you to be more descriptive in the replies, though, since I found the "Getting started" section impossible to follow.

 

Thanks,

 

f_lande

Link to comment
Share on other sites

9 hours ago, f_lande said:

I kindly ask you to be more descriptive in the replies,

 

I also asked if you were using import { gsap } from "gsap" or <script src=""> in your html, which makes a huge difference, but you didn't respond. 

 

I also said that you probably don't need to use <reference> as that is what a tsconfig file is for, which I linked to TypeScript's documentation on.

https://www.typescriptlang.org/docs/handbook/tsconfig-json.html

 

In the first line, it states that the tsconfig file should be in the root of your directory.

 

Quote

The presence of a tsconfig.json file in a directory indicates that the directory is the root of a TypeScript project. The tsconfig.json file specifies the root files and the compiler options required to compile the project.

 

The Getting Started section is an introduction on how to use use GSAP's API, not how to setup projects. 

 

Here's a sample project. Again, you don't need to use <reference>. 

 

https://codesandbox.io/s/sharp-allen-rw5nn?file=/src/index.ts

 

If not using imports, then you would need to include the types in the tsconfig file, as I showed above. This replaces the need for using <reference>.

{
  "compilerOptions": {
    ...
  },
  "files": [
    "node_modules/gsap/types/index.d.ts"
  ]
}

 

 

Link to comment
Share on other sites

9 hours ago, f_lande said:

I found the problem. I was wrongfully including the type libraries file like this:

 

/// <reference path = "../node_modules/gsap/types/gsap-core.d.ts"/>

 

and not like this:

 

/// <reference path = "../node_modules/gsap/types/index.d.ts"/>

 

I just don't think I saw it written anywhere, but I may be wrong here.

 

That still wouldn't be correct as the gsap-core.d.ts contains just the core types. index.d.ts contains all the types, including plugins. Maybe more like this.

/// <reference types="gsap" />

 

And no, it's not in any of our documentation because using <reference> is an old technique that was needed before TypeScript supported ES Modules. It's not needed anymore as imports will automatically import the types, and if you aren't doing imports, you can add the types location to your tsconfig file. A tsconfig file is recommended for every TypeScript project as it tells TypeScript how to compile your project.

 

https://medium.com/extra-credit-by-guild/tsconfig-json-demystified-d8f333e578c1

 

 

Link to comment
Share on other sites

Hi OSUblake,

sorry, I didn't provide enough information.

1. In my "StartPage.aspx" file I include the line:

      <script src = "js/gsap.min.js"></script>
2. In one of my TypeScript files, I include the lines:

    /// <reference path = "pixi.js.d.ts"/>
    /// <reference path = "gsap/index.d.ts"/>
    and as far as I can see it works now;

3. About the "tsconfig.json" file, it probably goes in the project's directory, as opposed to the solution's directory,

    in VisualStudio parlance, I'll try. In general, though, for VisualStudio it doesn't seem to be "mandatory", since

    (as far as I can understand) a few of the options offered by the this file are already present in the project's pro-

    perties page, and it probably works based on the predefined settings it has;

4. ES Modules. Honestly, I don't know what they are, and maybe I'm already using them unawarely. Does the "ES

    Modules" concept apply to my TypeScript files, or to the libraries they use? Currently I'm separating my applica-

    tion into a few files ("modules?"), sharing the same namespace, but keeping some functions local (i.e. unacces-

    sible from external files) and some exported ("extern") so to make them accessible from other files. The same also

    applied for local/global variables. Am I using ES modules?

5. Last but not least, let me add a constructive criticism. I agree that, as you say, "The Getting Started section is an

    introduction on how to use use GSAP's API, not how to setup projects". But, on the other hand, how can I use GSAP's

    API if I can't setup a project? It looks like a chicken-and-egg issue, so I kindly ask you to add a newcomer's section a-

    bout how to set up a "Hello GSAP" project, that doesn't use strange frameworks or obscure (to me, at least) environ-

    ments, as this can't but do good to your nice library diffusion!!

 

Thanks & best regards,

 

f_lande

Link to comment
Share on other sites

Hey @f_lande,

 

Just jumping in to say sorry you found it frustrating getting started.

I think what Blake meant was that our 'getting started' section is focused on how to use GSAP whereas the Installation page contains instructions on how to set up a project.

However, that being said. Our installation page doesn't use strange frameworks or obscure environments. We cover the two common ways to include external JS libraries, via a script tag or by using a package manager like NPM or Yarn and importing the files. These are the standard ways to include JS libraries in your projects and are used across all frameworks and setups from basic HTML pages with no build process, all the way to Vue or react projects. They are entirely framework agnostic. Typescript even has a section in their docs explaining modules you can read more here

 

As Blake said - If you're using ES Modules to import import { gsap } from "gsap"the definitions should automatically be included. The way that you're approaching it is an incorrect approach for typescript, not an issue with GSAP.
 

On 12/17/2021 at 4:55 PM, OSUblake said:

You usually don't need to do <reference> for definitions like that. That's what a tsconfig file is for.

https://www.typescriptlang.org/docs/handbook/tsconfig-json.html


The use of typescript looks to be adding an additional layer of confusion/complexity here but it may help to take a step back and take a look at what ES modules are. 

 



Sorry this has been a rocky start, I empathise, setting up projects can be an almighty pain and it's hard to know where the issue lies and what to google first!

I hope you enjoy working with the tools once they're set up.

 

Link to comment
Share on other sites

Hi Cassie,

thanks for your reply, first of all.

I think the main point here is that it is difficult for you, that quite surely know your library inside out, to understand what a newcomer encounters when gets in touch with it for the first time.

This said, as soon as you start talking CodePen, npm, yarn, ES modules or any other environment/framework/whatever you like to call it, you're losing half of your audience. It's pointless to make a document useful only to the ones that already know it.

 

I did try to use the "tsconfig.json" file in my project, and although useable, I found it more cumbersome than useful, given the project organization that real Visual Studio provides, not its useless "editor on steroids" Visual Studio Code counterpart.

 

So, if there are two more common ways to include external JS libraries, well, I think that it might be useful to have two - although minimal - examples of usage, one for each of them, so that a new user could download and test by him/herself, in an autonomous environment and see/understand who does what. I saw your videos, and I couldn't follow most of them, be it my non-native English or pre-reqs that I probably don't have.

 

I'll try to learn by myself what "ES modules" are, and if they can provide help in my project's development, although probably, as I said, I'm already using them unawarely.

 

Last but not least, I do appreciate your library and I'm starting to explore the various possibilities it offers, after I cracked the nut about how to start it up.

 

Thanks & best regards,

 

f_lande

Link to comment
Share on other sites

 

9 hours ago, f_lande said:

4. ES Modules. Honestly, I don't know what they are, and maybe I'm already using them unawarely. Does the "ES

    Modules" concept apply to my TypeScript files, or to the libraries they use? Currently I'm separating my applica-

    tion into a few files ("modules?"), sharing the same namespace, but keeping some functions local (i.e. unacces-

    sible from external files) and some exported ("extern") so to make them accessible from other files. The same also

    applied for local/global variables. Am I using ES modules?

 

It sounds like you are using the legacy way of doing modules in TypeScript. Not that is wrong, or bad, but that technique has largely been replaced since ES Modules started to become prevalent maybe 5 years ago.

 

You would know if you are using ES Modules because you have to explicitly add imports to every file that uses whatever you are importing i.e. import { foo } from "bar", and right now might not be the best time to start introducing them to your project as you would almost certainly need to add additional build steps and config files to your project, including a tsconfig file.

https://docs.microsoft.com/en-us/visualstudio/javascript/javascript-in-vs-2017?view=vs-2022

 

9 hours ago, f_lande said:

5. Last but not least, let me add a constructive criticism. I agree that, as you say, "The Getting Started section is an

    introduction on how to use use GSAP's API, not how to setup projects". But, on the other hand, how can I use GSAP's

    API if I can't setup a project? It looks like a chicken-and-egg issue, so I kindly ask you to add a newcomer's section a-

    bout how to set up a "Hello GSAP" project, that doesn't use strange frameworks or obscure (to me, at least) environ-

    ments, as this can't but do good to your nice library diffusion!!

 

The easiest way to get started with GSAP has always been and will always be a simple <script src=""> tag. If someone wants to go beyond that by using modules, we provide files to do that, but a <script> tag will almost certainly work in any type of environment. 

 

But your setup is far from common. We might a get an ASP related question once a year, but it has never been about to setup a project. Do you think you can send me a sample project just to see how you set everything is setup, and maybe let any else who is doing something similar to you to have something to reference?

 

Link to comment
Share on other sites

Hi OSUblake,

sure, I'm more than glad to share my mini-demo project, hoping to learn something from it, and that it might be useful to others as well.

It is a minimal VS2019 project, and it works OK with current settings.

In order to be able to upload it, I had to remove the Microsoft "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0" package that it uses,

but apart from it, it is absolutely minimal and I DO declare the GSAP library through a

 

  <script src = "js/gsap.min.js"></script>
 

line in the ASPX file. Maybe this is an uncommon setup, but I find it very useful since I can call the C# backend methods as if they were local calls, and the JS frontend gets called back on data receival, with the ASPX environment hiding all the underlying AJAX stuff, hence making it more similar to the procedural environments I'm used to.

In the "01_GstUtilFuncs.ts" file, I add once and for all the references to the data types files and that's it:

 

/// <reference path = "pixi.js.d.ts"/>
/// <reference path = "gsap/index.d.ts"/>
 

You tell me that this is weird, outdated and whatever, but I wouldn't know how else to do, without the "tsconfig.json" that you suggest.

In the project's Properties page, I see that the following settings are listed:

ECMAScript version: ECMASCript 5

JSX compilation in TSX files: React

Module System: None (and the other options are: CommonJS, AMD, UMD, System and ES2015, but they mean nothing to me, and I wouldn't know what to choose). For sure, I don't have to add any import { foo } from "bar" whatsoever statement, so I think this is quite simple and straightforward.

 

Thanks & best regards,

 

f_lande

 

27_Tweening_211220.rar

Link to comment
Share on other sites

2 hours ago, f_lande said:

Maybe this is an uncommon setup, but I find it very useful since I can call the C# backend methods as if they were local calls, and the JS frontend gets called back on data receival, with the ASPX environment hiding all the underlying AJAX stuff, hence making it more similar to the procedural environments I'm used to.

 

No that's fine. 

 

2 hours ago, f_lande said:

In the "01_GstUtilFuncs.ts" file, I add once and for all the references to the data types files and that's it:

 

/// <reference path = "pixi.js.d.ts"/>
/// <reference path = "gsap/index.d.ts"/>

 

And after looking at your project, that would be the correct way to reference the types.

 

What confused me at first is that you had node_modules in the path in one of your posts. So I assumed you were using modules as it's rare for someone not to use modules if they have node_modules folder.

/// <reference path = "../node_modules/gsap/types/index.d.ts"/>

 

2 hours ago, f_lande said:

You tell me that this is weird, outdated and whatever, but I wouldn't know how else to do, without the "tsconfig.json" that you suggest.

 

Maybe "not common" is a better term. TypeScript had modules first, then JavaScript added modules, so then TypeScript had to change stuff around to support JavaScript modules, which resulted in the TypeScript version of module being renamed to namespace

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

 

Quote

A note about terminology: It’s important to note that in TypeScript 1.5, the nomenclature has changed. “Internal modules” are now “namespaces”. “External modules” are now simply “modules”, as to align with ECMAScript 2015’s terminology

 

After that change, TypeScript went on to suggest using modules over namespaces in modern code.

 

https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html

 

Quote

we recommended modules over namespaces in modern code.

 

But that's really not important right now. I would just keep on doing what you're doing as you know it well and it works. Don't fix something if it isn't broke. 😉

 

Link to comment
Share on other sites

10 hours ago, OSUblake said:

 

No that's fine. 

 

 

And after looking at your project, that would be the correct way to reference the types.

 

What confused me at first is that you had node_modules in the path in one of your posts. So I assumed you were using modules as it's rare for someone not to use modules if they have node_modules folder.

/// <reference path = "../node_modules/gsap/types/index.d.ts"/>

 

 

Maybe "not common" is a better term. TypeScript had modules first, then JavaScript added modules, so then TypeScript had to change stuff around to support JavaScript modules, which resulted in the TypeScript version of module being renamed to namespace

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

 

 

After that change, TypeScript went on to suggest using modules over namespaces in modern code.

 

https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html

 

 

But that's really not important right now. I would just keep on doing what you're doing as you know it well and it works. Don't fix something if it isn't broke. 😉

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...