If you have to extend an existing object with additional property, always prefer Vue.set()
over Object.assign()
(or spread operator).
Example below explains implications for different implementations.
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
// Following code is a modified version of that found at https://blog.cloudflare.com/dronedeploy-and-cloudflare-workers/ | |
/** | |
* Fetch and log a request | |
* @param {Request} request | |
*/ |
import { createConnection, createPool, createPoolCluster } from './interfaces'; | |
interface promise { | |
createConnection: createConnection; | |
createPool: createPool; | |
createPoolCluster: createPoolCluster; | |
} | |
declare const mariadb: createConnection & createPool & createPoolCluster; |
/// <reference types="node" /> | |
export interface ConnectionOptions { | |
bigNumberStrings?: boolean; | |
bulk?: number; | |
charset?: string; | |
compress?: boolean; | |
logPackets?: boolean; | |
connectAttributes?: boolean | object; // ??? | |
connectTimeout?: number; |
service: serverless-aws-node-rest-api | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
stage: dev | |
region: us-east-1 | |
iamRoleStatements: | |
- Effect: Allow | |
Action: |
<?php | |
/** | |
* This file is part of PSR-7 JSON Web Token Authentication middleware | |
* | |
* Copyright (c) 2015-2016 Mika Tuupola | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/mit-license.php | |
* |
app.run(['$rootScope', '$window', '$location', function($rootScope, $window, $location) { | |
$rootScope.$on('$viewContentLoaded', function() { | |
$window.ga('send', 'pageview', { page: $location.path() } ) | |
}); | |
}]); |