Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/jsifier.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ function(${args}) {
function addImplicitDeps(snippet) {
for (const dep of calcImplicitDeps(snippet)) {
if (dep === symbol) continue;
if (symbolsOnly && LibraryManager.library[dep + '__const']) continue;
if (explicitDeps.has(dep)) {
if (!symbolsOnly && (STRICT || !isUserSymbol) && LibraryManager.library[symbol] !== dep) {
warn(`${symbol}: redundant __deps entry: ${dep}`);
Expand Down
5 changes: 4 additions & 1 deletion src/utility.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,11 @@ export const decoratorSuffixes = [
'__const',
];

const decoratorSuffixSet = new Set(decoratorSuffixes);

export function isDecorator(ident) {
return decoratorSuffixes.some((suffix) => ident.endsWith(suffix));
const index = ident.lastIndexOf('__');
return index > 0 && decoratorSuffixSet.has(ident.slice(index));
}

export function defineConsts(consts) {
Expand Down
Loading