To define a recursive type, use this trick:
type JSONValue = string | number | boolean | JSONObject | JSONArray;
interface JSONObject {
[x: string]: JSONValue;
}| let appId = login = password = phone = '' | |
| const rl = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout | |
| }) | |
| let asker = (variable, name) => () => rl.question(`Введите ${name}: `, answer => { | |
| variable = answer | |
| rl.close() // ЧТО Я ДОЛЖЕН ЗДЕСЬ НАПИСАТЬ? |
| const readFile = (file) => { | |
| let reader = new global.FileReader(); | |
| return new Promise((resolve, reject) => { | |
| reader.onload = (event) => { | |
| file.data = event.target. result; | |
| resolve(file); | |
| }; | |
| reader.onerror = () => { |
| Pidors.findAll({ | |
| attributes: [[Sequelize.fn('COUNT', Sequelize.col('pidorid')), 'pidor_times'], 'pidorid'], | |
| where: {chatid: 2000000002}, | |
| order: [['pidor_times', 'DESC']], | |
| group: 'pidorid', | |
| limit: 10 | |
| }) |
| {"displayName":"Chrome","base00":"#252525","base01":"#393f4c","base02":"#454d5d","base03":"#454D5D","base04":"#a38fb2","base05":"#b4a9cb","special00":"#69c0f5","special01":"#53eb8c","special02":"#df9950","special03":"#acb3d8","special04":"#07c5a7","special05":"#e9f4fe","special06":"#7d99b6","special07":"#6b6b6a","state00":"#ad710d","state01":"#475983","state02":"#ffffff","state03":"#475983","state04":"#00ff7f","state05":"#181d20","state06":"#b9cadb","hidden":true} |
Взято отсюда microsoft/TypeScript#14094 (comment)
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
type NameOnly = { is: "NameOnly", name: string };
type FirstAndLastName = { is: "FirstAndLastName", firstname: string; lastname: string };
type Person = XOR<NameOnly, FirstAndLastName>;
let person: Person;openssl req -x509 -nodes -new -keyout inoy.rambler.ru.key -out inoy.rambler.ru.crt -subj "/CN=inoy.rambler.ru" -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:inoy.rambler.ru')) -sha256 -days 3650
| import React from "react"; | |
| import ReactDOM from "react-dom"; | |
| const UserContext = React.createContext(); | |
| const Donor = () => ( | |
| <UserContext.Consumer> | |
| { | |
| store => { | |
| const { value, onChange } = store |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>name</key> | |
| <string>Monokai</string> | |
| <key>settings</key> | |
| <array> | |
| <dict> | |
| <key>settings</key> |
| .h-info li,.h-info p { | |
| color: #cbcbcb; | |
| } | |
| .h-info a { | |
| color: #558fab; | |
| } | |
| .h-info abbr { | |
| border-bottom: 1px dotted #cbcbcb; |