Coder Social home page Coder Social logo

bricewilson / typescript-getting-started Goto Github PK

View Code? Open in Web Editor NEW
180.0 180.0 303.0 128 KB

Official repo for the "TypeScript: Getting Started" course on Pluralsight.

Home Page: https://app.pluralsight.com/library/courses/typescript-getting-started/table-of-contents

HTML 90.35% JavaScript 9.65%

typescript-getting-started's People

Contributors

bricewilson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typescript-getting-started's Issues

webpack devserver build error

I'm in the module: Installing TypeScript and Configuring a Project

I'm on the video: Configuring Compiler Options in tsconfig.json

I got a build error when running 'yarn start' from webpack devserver when using the null assertion operator, to fix it I had to install ts-loader into my dev dependencies and then add ts-loader to my webpack config.

module.exports = {
entry: './app/app.ts',
devtool: 'inline-source-map',
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
module: {
rules: [{ test: /.tsx?$/, loader: 'ts-loader' }]
},

output: {
filename: 'bundle.js'
},
devServer: {
inline: false
}
};

Unable to run

Hi, I've been trying to run the program as shown in the course.

I first ran it with the dependencies in the versions they are here on this repo.
But When time came to run the application, this error showed up:

[webpack-cli] Unable to load '@webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
    at WebpackCLI.makeCommand (C:\Git\TypeScript-Getting-Started\node_modules\webpack-cli\lib\webpack-cli.js:108:21)

I did'nt know what this meant, but the dependencies were quite old, so I figured updating them could make sense.And they now look like this:

  "devDependencies": {
    "ts-loader": "9.4.1",
    "typescript": "4.8.4",
    "webpack": "5.74.0",
    "webpack-cli": "4.10.0",
    "webpack-dev-server": "4.11.1"
  }

I then ran npm install, tsc app\app.ts and npm start.
This does start the application like this:

> npm start   

> [email protected] start
> webpack serve

<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://10.10.110.162:8080/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Git\TypeScript-Getting-Started\public' directory
asset bundle.js 568 KiB [emitted] (name: main)
runtime modules 27.3 KiB 12 modules
modules by path ./node_modules/ 159 KiB
  modules by path ./node_modules/webpack-dev-server/client/ 55.8 KiB 12 modules
  modules by path ./node_modules/webpack/hot/*.js 4.3 KiB
    ./node_modules/webpack/hot/dev-server.js 1.59 KiB [built] [code generated]
    ./node_modules/webpack/hot/log.js 1.34 KiB [built] [code generated]
    + 2 modules
  modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB
    ./node_modules/html-entities/lib/index.js 7.74 KiB [built] [code generated]
    ./node_modules/html-entities/lib/named-references.js 72.7 KiB [built] [code generated]
    + 2 modules
  ./node_modules/ansi-html-community/index.js 4.16 KiB [built] [code generated]
  ./node_modules/events/events.js 13.8 KiB [built] [code generated]
./app/app.ts 243 bytes [built] [code generated]
webpack 5.74.0 compiled successfully in 1490 ms

But, when I now try to access http://localhost:8080/ in the browser, this is the only thing I get:

Cannot GET /

Wat is wrong?

code snippets

Could you please provide the code snippets that you're using throughout the course?

inconsistent element id

Hi, great course but I found an issue. There is an inconsistency between the course video and the source code in github

The index.html element is scores, but the JS is looking for "postedscores"
I just realised the problem the master branch does not have the id on the element, some of the later branches do however.
You need to add the "postedScores" element to the master branch of index.html
postedScores

<div class="col-sm-offset-2 col-sm-10" id="scores">

the code in module "Demo: Adding Type Annotations and Default Parameter Values"
const scoreElement: HTMLElement | null = document.getElementById('postedscores');

sign in

Hi,
I've cloned master branch and when i start server and go to localhost/8080 it prompts for sign in.
what are credentials?
Thanks,
Mike

Installing TypeScript and Configuring a Project(Video 4)

Hello Brice, I am having issue with your project. I actually cloned the repository as it is and following the video when it was time to see the changes in a browser I get this error when I enter the "npm start" step, what am i missing?
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.