This file contains hidden or 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
extension type ChannelId(String value) {} | |
extension type StationId(String value) {} | |
extension type SomeNumberId(int value) {} | |
Map<ChannelId, String> tvChannelNames = {ChannelId('123'): 'NBC'}; | |
void main() { | |
print(tvChannelNames[StationId('123')]); // No Error! | |
print(tvChannelNames[SomeNumberId(123)]); // No Error! | |
print(tvChannelNames[123]); // collection_methods_unrelated_type lint rule |
This file contains hidden or 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
0 |
This file contains hidden or 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
Testtet |
This file contains hidden or 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
import { iff } from './globalUtils'; | |
function someRenderFunction() { | |
return ( | |
<div className="otsPropertyForm"> | |
{iff(showTeamList, () => ( | |
<FormSection> | |
<FormHeading>Select a Team:</FormHeading> | |
<ListBox items={teamItems} value={teamId} onChange={this._onTeamListChange} /> | |
</FormSection> |
This file contains hidden or 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
/** | |
* Calls the callback and returns its result if the expression is truthy | |
* | |
* @param {string} expression | |
* @param {Function} callback | |
* @return {variant} Value of callback() if expression is true. Otherwise 'undefined' | |
*/ | |
export function iff(expression, callback) { | |
if (expression) { |
This file contains hidden or 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
<!-- Injected Code --> | |
<script language="JavaScript" type="text/javascript"> | |
// Comcast Cable Communications, LLC Proprietary. Copyright 2014. | |
// Intended use is to display browser notifications for critical and time sensitive events. | |
var _ComcastAlert = (function(){ | |
return { | |
SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do' | |
, dragObj: {zIndex: 999999} |