Skip to content

Commit

Permalink
chore!: deprecate resolveExtends of custom-selector (#2911)
Browse files Browse the repository at this point in the history
  • Loading branch information
idoros authored Oct 2, 2023
1 parent 86c105b commit d56e5f5
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions packages/core/src/stylable-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
StylableSymbol,
CSSClass,
STSymbol,
STCustomSelector,
VarSymbol,
CSSVarSymbol,
KeyframesSymbol,
Expand All @@ -20,7 +19,6 @@ import {
CSSContains,
STStructure,
} from './features';
import type { StylableTransformer } from './stylable-transformer';
import { findRule } from './helpers/rule';
import type { ModuleResolver } from './types';
import { CustomValueExtension, isCustomValue, stTypes } from './custom-values';
Expand Down Expand Up @@ -374,7 +372,6 @@ export class StylableResolver {
meta,
deepResolved.symbol,
false,
undefined,
validateClassResolveExtends(meta, name, diagnostics, deepResolved)
);
break;
Expand Down Expand Up @@ -429,7 +426,6 @@ export class StylableResolver {
meta: StylableMeta,
nameOrSymbol: string | ClassSymbol | ElementSymbol,
isElement = false,
transformer?: StylableTransformer,
reportError?: ReportError
): CSSResolvePath {
const name = typeof nameOrSymbol === `string` ? nameOrSymbol : nameOrSymbol.name;
Expand All @@ -440,23 +436,6 @@ export class StylableResolver {
: meta.getClass(nameOrSymbol)
: nameOrSymbol;

const customSelector = isElement
? null
: STCustomSelector.getCustomSelectorExpended(meta, name);

if (!symbol && !customSelector) {
return [];
}

if (customSelector && transformer) {
const parsed = transformer.resolveSelectorElements(meta, customSelector);
if (parsed.length === 1) {
return parsed[0][parsed[0].length - 1].resolved;
} else {
return [];
}
}

if (!symbol) {
return [];
}
Expand Down

0 comments on commit d56e5f5

Please sign in to comment.