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
type Dot = "."; | |
type PopFirst<K extends string> = K extends `${infer A}${Dot}${infer B}` | |
? B | |
: K; | |
type PickFirst<K extends string> = K extends `${infer A}${Dot}${infer B}` | |
? A | |
: K; | |
type Check< | |
R, |
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
? |
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 { app } from 'electron'; | |
import * as path from 'path'; | |
import * as fs from 'fs'; | |
export default class SimpleStore<Model extends Object> { | |
static STORE_NAME = 'persistence.json'; | |
private readonly storePath: string; | |
constructor() { |