This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Author: Charlie Jonas (charlie@callawaycloudconsulting.com) | |
// Description: Class is use for creating mock http callouts in test methods. | |
// See http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_testing_httpcalloutmock.htm | |
// for info on how to use class. | |
@isTest | |
global class MockHttpResponseGenerator implements HttpCalloutMock { | |
//require properites | |
private Map<String,String> responseMap = new Map<String,String>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Greeting { | |
constructor(name) { | |
this.name = name; | |
} | |
get hello() { | |
return Greeting.intro + this.name; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page showHeader="false" sidebar="false" applyBodyTag="false"> | |
<header> | |
<apex:outputPanel layout="none" rendered="{!$Label.Toggle_Local_Dev == '1'}"> | |
<apex:stylesheet value="https://localhost:8080/statictesting.resource/styles.css"/> | |
</apex:outputPanel> | |
<apex:outputPanel layout="none" rendered="{!$Label.Toggle_Local_Dev != '1'}"> | |
<apex:stylesheet value="{!URLFOR($Resource.StaticTesting, 'styles.css')}"/> | |
</apex:outputPanel> | |
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//replace with the id of uploaded image | |
ProductCreator.createProduct('[REPLACE]'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[react-redux-typescript-guide](https://github.com/piotrwitek/react-redux-typescript-guide) | |
[FAQ](http://redux.js.org/docs/FAQ.html) | |
[Redux Actions in typescript](https://spin.atomicobject.com/2017/07/24/redux-action-pattern-typescript/) | |
```typescript | |
export enum TypeKeys { | |
INC = 'INC', | |
DEC = 'DEC', | |
OTHER_ACTION = '__any_other_action_type__' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum CreatureKind { | |
Dog = "Dog", | |
Wolf = "Wulf", | |
Cat = "Cat", | |
Tiger = "Tiger", | |
} | |
interface Barker { | |
bark: () => string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//an alternate (and perhaps better approach) | |
interface IWeightedItem{ | |
weight: number | |
} | |
interface Grade extends IWeightedItem{ | |
score: number; | |
} | |
interface Product extends IWeightedItem{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MERGING */ | |
interface Foo{ | |
kungfoo: string | |
} | |
interface ExtraFooy extends Foo{ | |
tofu: string; | |
} | |
interface Bar{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Foo{ | |
twittle: string; | |
doBarStuff(b: Bar): number; | |
fooOptional?: number | |
} | |
interface Bar{ | |
one: number; | |
two: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page showHeader="false" sidebar="false" standardStylesheets="false"> | |
<script type="text/javascript"> | |
//global injects | |
const __ACCESSTOKEN__ = '{!$Api.Session_ID}'; | |
</script> | |
<div id="root"></div> | |
<script type='text/javascript' src="{!URLFOR($Resource.quote, 'vendors.js')}"></script> | |
<script type='text/javascript' src="{!URLFOR($Resource.quote, 'app.js')}" ></script> |
OlderNewer