{
"exports": {
"collections": {
"import": "dist/collections/index.mjs",
"require": "dist/collections/index.js",
"types": "dist/collections/index.d.ts",
}
This file contains 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 utility type merges two objects together while handling arrays. | |
* An intersection of objects (L & R) can behave oddly when dealing with arrays: | |
* | |
* Typescript doesn't complain about a type error in t.a, because never[] & 'something'[] => never | |
* declare const t: { a: readonly [] } & { a: readonly 'something'[] } | |
* t.a[0] === 'x' | |
* | |
* Likewise, the below is also valid, because readonly 'a'[] & readonly 'b'[] also results in never | |
* because both types don't overlap with each other and ts won't turn them into ('a' | 'b')[] like |
This file contains 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
// @ts-check | |
import vueRouter from 'unplugin-vue-router/vite' | |
/** @type {import('aeria-ui-build').InstanceConfig} */ | |
export default { | |
site: { | |
title: 'Quickstart', | |
signinText: 'Admin panel', | |
signupForm: true, | |
}, |
This file contains 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
#!/bin/bash | |
function getSpan() { | |
year="$1" | |
month="$2" | |
dayMin="$3" | |
dayMax="$4" | |
date="$year-$month-$d" |
This file contains 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
export type ObjectToSchema<TObject, TRequired extends string[] | null = null> = TObject extends readonly [infer K] | |
? ValueToProperty<[K]> | |
: keyof TObject extends never | |
? { type: 'object' } | |
: { | |
[P in keyof TObject]: TObject[P] extends infer Value | |
? ValueToProperty<Value> | |
: never | |
} extends infer Properties | |
? TRequired extends null |
This file contains 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
local vim = vim | |
local Plug = vim.fn['plug#'] | |
vim.opt.hidden = true | |
vim.opt.number = true | |
vim.opt.exrc = true | |
vim.opt.relativenumber = true | |
vim.opt.inccommand = 'split' | |
vim.opt.expandtab = true | |
vim.opt.showmatch = true |