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 marked this pull request as ready for review February 28, 2021 09:05
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