Skip to content

js emit is outdated #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fcoury opened this issue Jul 15, 2015 · 11 comments
Closed

js emit is outdated #467

fcoury opened this issue Jul 15, 2015 · 11 comments
Labels

Comments

@fcoury
Copy link
Contributor

fcoury commented Jul 15, 2015

What does this warning means and how to fix it?

app ts - _users_fcoury_projects_ng-book2_manuscript_code_how_angular_works_inventory_app - atom

@basarat
Copy link
Member

basarat commented Jul 15, 2015

@fcoury Press ctrl+s to emit a .js file corresponding to the .ts file

@faisalnet5
Copy link

I am also seeing the same warning message. Did try pressing ctrl+s to emit a .js file corresponding to the .ts file...but still no difference.

Any more clue plz?

@basarat
Copy link
Member

basarat commented Jul 16, 2015

Did try pressing ctrl+s to emit a .js file corresponding to the .ts file.

Did the .js file change when you saved it? Try deleting it and seeing if saving the .ts brings back the .js file.

Also what is you tsconfig.json. Thanks 🌹

@faisalnet5
Copy link

Hi Basaerat, thanks for ur reply. Yes..I did try all as u suggested. First of all when I am changing .ts, the .js is changing only when I am saving .ts and recompiling it through tsc compiler.

I also tried to delete .js entirely and generate a fresh one.

However in all cases that Warning message 'Js emit is outdated' is appearing. Particularly noticed that as soon as when typing any new code that Warning appears.

Btw, do you think that is any important issue? Because for that Warning, me not having or at least for now not seeing any other exceptions though.

Lastly, here is my sample 'tsconfig.json':

{
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"out": "C:/Users/AnyName/Desktop/Play/greeter.js",
"sourceMap": true
},
"files": [
"greeter.js"
]
}

Thanks

@faisalnet5
Copy link

Basaerat, its me again....this morning I got two updates and one of them was from 'atom-typescript'. After installing update and restarting Atom, everything looks fine at my end.

Dont know whether there is any relationship or not ;)

@basarat
Copy link
Member

basarat commented Jul 17, 2015

""out": "C:/Users/AnyName/Desktop/Play/greeter.js" we have poor out support, specifically compileOnSave doesn't work tracked here : #206

@dcsan
Copy link

dcsan commented Sep 24, 2015

see this too on osx

does it mean the tscnofig.json file itself is outdated, or some other output is not up to date.

image

I used F6 to rebuild all, but no change to this error message.

@dcsan
Copy link

dcsan commented Sep 24, 2015

tsc itself from cmd line also compiles cleanly.

when i open the .tsconfig the error above is not shown, it only appears on toggling back to a .ts file.

image

{
    "buildOnSave": true,
    "scripts": {
        "postbuild": "echo after building"
    },
    "compilerOptions": {
        "target": "es5",
        "declaration": true,
        "noImplicitAny": false,
        "removeComments": false,
        "module": "commonJS",
        "noLib": false,
        "sourceMap": true,
        "newLine": "LF"
    },
    "filesGlob": [
        "./src/**/*.ts",
        "./src/*.ts",
        "!./node_modules/**/*.ts"
    ],
    "files": [
        "./src/adapters/BaseAdapter.d.ts",
        "./src/adapters/BaseAdapter.ts",
        "./src/adapters/CurrentAdapter.d.ts",
   ... bunch of files

@basarat
Copy link
Member

basarat commented Sep 24, 2015

"buildOnSave": true,

Digression: @dcsan Don't recommend using buildOnSave if you are not using --out (which you are not).

does it mean the tscnofig.json file itself is outdated, or some other output is not up to date.

It means the current file's .js emit is not the same as what would be generated if we compile the .ts to .js again.

@basarat
Copy link
Member

basarat commented Sep 24, 2015

everything looks fine at my end.

Should have closed then. Closing now 🌹

@dcsan if your questions aren't answered, feel free to continue discussion here

@basarat basarat closed this as completed Sep 24, 2015
@doliver3
Copy link

doliver3 commented Dec 6, 2015

  1. Why does the js get outdated
  2. Why is the error displayed in red as if it is a programmer's error. It is not a programmers error if I understand right. It is an indication that the tool is not keeping up with the compilation it needs to do so the styling should not be a red x nor should it imply as it does now the that the programmer has an issue to fix.

@TypeStrong TypeStrong locked and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants