Skip to content

Defining function in js with $functions without extern fn silently does nothing #10748

@timotheeguerin

Description

@timotheeguerin

Add

export const $functions = {
  TestFn: {
    testFn: (context, target) => {
      return target;
    },
  },
};

then try to use with

op original(@typeChangedFrom(Versions.v2, int32) a: string, b: string): void;

alias T = testFn(original, #["b", "a"]);

@route("/test")
op test is T;

T is just nothing(not sure exactly but op test has no parmaeters), no errors.

I think we need to ban defining those functions

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions