JavaScript errors on Perlin Noise code

So, i am not that good at JavaScript code. But i couldnt find any perlin noise codes in python so i found one in JavaScript. Though, i needed to fix some errors that come from importing code from the outside world to the makecode editor, most of them were an easy fix except for these last ones. This isn’t a rush it is just something i am tinkering with.

The only errors there are is 2 “Decleration or Statement excpected”

Here is the code:

Seems like the code for Perlin noise is for Javascript and not Typescript, MakeCode Arcade uses TypeScript instead of JavaScript but still mentions it as Javascript. Not sure why this error is happening but you can try using a Python implementation of Perlin noise or a game made with a TypeScript implementation of Perlin noise by yoxd707 (It’s in perlinNoise.ts)

Using this is unsupported outside of a method. You’re using it in a function call, which is not implemented.

Under ‘Unsupported language features’:

  • interface with same name as a class
  • casts of a non-class type to a class
  • interface that extends a a class
  • inheriting from a built-in type
  • this used outside of a method
  • function overloading