Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(multi selector): implement multi selector support #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nemni8
Copy link
Collaborator

@nemni8 nemni8 commented Feb 24, 2021

No description provided.

@nemni8 nemni8 force-pushed the multi-selector-validation branch from 897986c to d5dc1f9 Compare February 24, 2021 21:56
@nemni8 nemni8 force-pushed the multi-selector-validation branch from d5dc1f9 to 94d8c59 Compare February 28, 2021 08:27
@nemni8 nemni8 marked this pull request as ready for review February 28, 2021 09:05
@nemni8 nemni8 force-pushed the multi-selector-validation branch from 94d8c59 to 7b4e699 Compare February 28, 2021 10:59
@nemni8 nemni8 requested review from matanlb and tombenezra February 28, 2021 11:02
return services.find(
service =>
service.name === $W &&
!Object.prototype.hasOwnProperty.call(service, "memberOf")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

service.hasOwnProperty("memberOf")


const QUERYABLE_TYPE = "TypeNameToSdkType";
const $W = "$w";
const $W_MEMBERS_KEY = "/** $W_NAMESPACE_MEMBERS */";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mask with hashtags or similar

const queryableType = getQueryableObjectType(services);

const page$w = fs.readFileSync("./src_types/pages/$w.d.ts", null, "utf-8");
let page$w = fs.readFileSync("./src_types/pages/$w.d.ts", "utf-8");
page$w = page$w.replace($W_MEMBERS_KEY, $wMembers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assign to different variables

type OnlyVaildSelectorsChars<S> =
S extends ""
? unknown
: S extends `${VaildSelectorsChars}${infer Tail}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure selectors are separated with comma, and not every legal char

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button #button1, #button2 ==> true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

,#button1 ==> true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants