Skip to content

Add compiler support to disable function hoisting #40797

Closed as not planned
Closed as not planned
@pranaydutta89

Description

@pranaydutta89

Search Terms

Espruino Typescript, disable function hoisting in typescript

Suggestion

Add compiler support for disabling function hoisting currently transpiled code use a lot of function hoisting features , i know its normal javascript implementation but i have been trying to use typescript in my IOT projects using Espruino , and esprunio interpretter doesn't support function hoisting, so i have to manually change my transpiled code , like __extends , __generator etc

Use Cases

We would be able to use Typescript in Espruino projects

Example

By adding another compileroption flag in tsconfig.json

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Out of ScopeThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions