Skip to content

utility function import #66

@ksjogo

Description

@ksjogo

Given a file util.ts with

export function map() {
  return 1;
}

and a file Actors.ts with

import { map } from "./util";

export default class Actor {
  something() {
    return map();
  }
}

The generated util.gd file will be empty and only have the comment:

# This file has been autogenerated by ts2gd. DO NOT EDIT!








The Actor.gd file will look like:


# This file has been autogenerated by ts2gd. DO NOT EDIT!



class_name Actor
    



var () => number = load("res://actors/util.gd")

func something():
  return map()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions