Skip to content

Instantly share code, notes, and snippets.

@ValeryVS
ValeryVS / context.ts
Created April 2, 2020 14:15
vector-yandex-maps-react-typescript
import React from 'react';
// @ts-ignore
export const MapsContext = React.createContext<typeof ymaps | null>(null);
MapsContext.displayName = 'SDCYandexMaps';
function BasePage() {}
BasePage.create = function(pageConstructor) {
return new pageConstructor();
}
module.exports = BasePage;
@ValeryVS
ValeryVS / gist:f608bd29da796d165518b90bad3de167
Created June 21, 2017 08:07
Angular: get @angular/router work, while open index.html from filesystem
<!-- get @angular/router work, while open inde.html from fylesystem -->
<script>document.write('<base href="' + document.location + '" />');</script>
@ValeryVS
ValeryVS / vscode-settings.json
Created June 5, 2017 09:14
default vscode settings
{
"typescript.tsdk": "node_modules/typescript/lib",
// format
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": false,
"html.format.enable": false,
"json.format.enable": false,
// view
"editor.renderIndentGuides": true,
@ValeryVS
ValeryVS / tslint-angular.json
Created June 2, 2017 12:54
TSLint config for angular libs and applications
{
"extends": [
"tslint:recommended"
],
"rules": {
"import-blacklist": [
true,
"rxjs"
],
"interface-name": [