DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.47k stars 30 forks source link

comptime serializer doesn't freeze functions #1493

Open bbrk24 opened 3 hours ago

bbrk24 commented 3 hours ago
x := comptime
  f := function()
    5
  f.a = 6
  return Object.freeze f
const x = Object.defineProperties(
  function () {
    return 5;
  },
  {
    a: {
      value: 6,
      writable: false,
      enumerable: true,
      configurable: false,
    },
  },
);
bbrk24 commented 3 hours ago

I can get a PR up for this tonight, assuming it isn't too gnarly.