RJ-Infinity / ThisCord

A Discord "Mod" / injector
3 stars 0 forks source link

allow exports function to use single varibles #5

Closed titushm closed 1 year ago

titushm commented 1 year ago

image like this

RJ-Infinity commented 1 year ago

i think that having a function that is somthing like exportUnique would be better as then you can use both systems

titushm commented 1 year ago

maybe singleExport would be better

RJ-Infinity commented 1 year ago

so that you can either export an object and have it merged with all the others or just export a single object which could only be called once per class

RJ-Infinity commented 1 year ago

maybe singleExport would be better

this dosent emphasise the fact that it can only be called once per module though

titushm commented 1 year ago

singleCanOnlyBeCalledOncePerModuleExport

RJ-Infinity commented 1 year ago

it can only be called once beacuse in the old system if you did

exports({
    ParseContent,
    resolveMentions,
    resolveChannelMentions,
});
exports({
    resolveRoleMentions,
    resolveRelativeTime,
    Sanitise
});

all the objects would be exported however with the new system as a single object is being exported it couldnt support two calls as then you would have to remove the previous export so it wwould be better if this creates an error

titushm commented 1 year ago

nice formatting

RJ-Infinity commented 1 year ago

i think exportSingle is better than singleExport as it fits in with exportAs better

titushm commented 1 year ago

Fixed in #6