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

Generate SObject type definitions for LWC #589

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

vazexqi
Copy link
Contributor

@vazexqi vazexqi commented Aug 21, 2018

What does this PR do?

At a high level, this monitors the faux-classes for SObjects and generates the corresponding type definition for it. An example is shown below:

global class Order_Item__c {
    global List<AttachedContentDocument> AttachedContentDocuments;
    global List<Attachment> Attachments;
    global List<CombinedAttachment> CombinedAttachments;
    global List<ContentDocumentLink> ContentDocumentLinks;
    global User CreatedBy;
    global Id CreatedById;
...

generates

declare module "@salesforce/schema/Order_Item__c.CreatedBy" {
  const CreatedBy:any;
  export default CreatedBy;
}
declare module "@salesforce/schema/Order_Item__c.CreatedById" {
  const CreatedById:any;
  export default CreatedById;
}
declare module "@salesforce/schema/Order_Item__c.CreatedDate" {
  const CreatedDate:any;
  export default CreatedDate;
}
declare module "@salesforce/schema/Order_Item__c.Id" {
  const Id:any;
  export default Id;
}
...

Currently, we only generate the non-collection types (which translates to non-relationship types in SObject)

What issues does this PR fix or reference?

@W-4565889@

@codecov
Copy link

codecov bot commented Aug 21, 2018

Codecov Report

Merging #589 into develop will decrease coverage by 0.58%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #589      +/-   ##
===========================================
- Coverage    72.68%   72.09%   -0.59%     
===========================================
  Files          155      155              
  Lines         6157     6157              
  Branches       953      953              
===========================================
- Hits          4475     4439      -36     
- Misses        1443     1485      +42     
+ Partials       239      233       -6
Impacted Files Coverage Δ
...kages/salesforcedx-vscode-apex/src/requirements.ts 27.5% <0%> (-35%) ⬇️
...code-apex/src/views/readableApexTestRunExecutor.ts 0% <0%> (-27.78%) ⬇️
...s/salesforcedx-vscode-apex/src/views/testRunner.ts 0% <0%> (-23.41%) ⬇️
...ges/salesforcedx-vscode-apex/src/languageServer.ts 40.74% <0%> (-11.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d806cb9...f7c1cbf. Read the comment docs.

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.

1 participant