You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this function named importAll which can recursively import files from directories and their subdirectories.
I have this proposal where my custom function will show the relative file system using intellisense such as import statements and import().
I think this will also be useful when importing it from another file. For example, we have two files named main.ts and import_all.ts where import_all.ts is located at /sub1/sub2/import_all.ts. When main.ts imports import_all.ts, the function it exports importAll would still show relative location of where import_all.ts, not main.ts's relative location.
Another idea adding to the one above: functions could identify their relative location within the file system. For example, if the file reads from CWD instead, we would know that that is the specified location.
My idea of how it could be implemented is maybe some kind of JSDOc comment that code editors could read easily, but maybe there could be a more intuitive way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have this function named
importAllwhich can recursively import files from directories and their subdirectories.I have this proposal where my custom function will show the relative file system using intellisense such as import statements and
import().I think this will also be useful when importing it from another file. For example, we have two files named
main.tsandimport_all.tswhereimport_all.tsis located at/sub1/sub2/import_all.ts. Whenmain.tsimportsimport_all.ts, the function it exportsimportAllwould still show relative location of whereimport_all.ts, notmain.ts's relative location.Another idea adding to the one above: functions could identify their relative location within the file system. For example, if the file reads from CWD instead, we would know that that is the specified location.
My idea of how it could be implemented is maybe some kind of JSDOc comment that code editors could read easily, but maybe there could be a more intuitive way.
Beta Was this translation helpful? Give feedback.
All reactions