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 logging | |
| from django.contrib.gis.db.backends.postgis.base import \ | |
| DatabaseWrapper as PostgisDBWrapper | |
| from django.db import ProgrammingError | |
| from .schema import TimescaleSchemaEditor | |
| logger = logging.getLogger(__name__) |
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
| interface GitProvider { | |
| download(): Code | |
| } | |
| class ProviderBase { | |
| endpoint: string | |
| } | |
| class GitHubProvider extends ProviderBase implements GitProvider { | |
| download() {} |
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 { immerable, produce } from 'immer' | |
| type POJO<T> = { | |
| [K in keyof T]: T[K] | |
| } | |
| class Car { | |
| [immerable] = true | |
| velocity = 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
| import React from "react" | |
| import { createOvermind } from "overmind" | |
| import { createHook, Provider } from "overmind-react" | |
| const app = createOvermind({ | |
| state: { | |
| counter: 0 | |
| }, | |
| actions: { | |
| increment({ state }) { |
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
| const incrementCounter = () => { | |
| type: 'INCREMENT', | |
| } | |
| const initialState = { | |
| counter: 0 | |
| } | |
| function reducer(state = initialState, action = {}) { | |
| switch(action.type) { |