Skip to content

Instantly share code, notes, and snippets.

@Krisztiaan
Krisztiaan / index.d.ts
Created September 9, 2020 20:27
react-native-tvos@0.62.2-1 typescript typing extension
import '@types/react-native';
import React from 'react';
import { ViewProps } from 'react-native';
declare module 'react-native' {
export const TVMenuControl: {
enableTVMenuKey(): void;
disableTVMenuKey(): void;
};
import { useState, useCallback } from 'react'
import { LayoutChangeEvent } from 'react-native'
interface Measurement {
width: number
height: number
}
type OnLayoutCallback = (event: LayoutChangeEvent) => void
@Krisztiaan
Krisztiaan / @types+react-native+0.62.14.patch
Last active August 26, 2020 20:54
Simple react-native-tvos typescript support. Use with `patch-package`.
diff --git a/node_modules/@types/react-native/index.d.ts b/node_modules/@types/react-native/index.d.ts
index dba6a80..114a383 100644
--- a/node_modules/@types/react-native/index.d.ts
+++ b/node_modules/@types/react-native/index.d.ts
@@ -63,6 +63,41 @@
import * as React from 'react';
+export const TVMenuControl: {
+ enableTVMenuKey(): void;
import React, { useContext, useEffect, useState, useCallback } from 'react';
import { TouchableWithoutFeedbackProps } from 'react-native';
import useDelayedState from './useDelayedState';
const FocusChangeContext = React.createContext<(isFocused: boolean, instant?: boolean) => void>(
() => undefined
);
const HasFocusContext = React.createContext<boolean>(false);
diff --git a/node_modules/@react-navigation/core/.vscode/settings.json b/node_modules/@react-navigation/core/.vscode/settings.json
new file mode 100644
index 0000000..81a8778
--- /dev/null
+++ b/node_modules/@react-navigation/core/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "deno.enable": false
+}
\ No newline at end of file
@Krisztiaan
Krisztiaan / extraTypes.d.ts
Last active February 12, 2020 14:56
Extra Typescript Types
type ValuesOf<T> = T extends { [key: string]: infer T } ? T : never
// type Parameters<T> = T extends (...args: infer T) => any ? T : never
type FirstParameter<T> = T extends (first: infer T, ...args: any) => any ? T : never
type SecondParameter<T> = T extends (first: any, second: infer T, ...args: any) => any ? T : never
type PromiseValue<T> = T extends Promise<infer U>
? U
: T extends (...args: any[]) => Promise<infer U>
? U
: T
type Require<T, P extends keyof T> = T & Required<Pick<T, P>>
import useDebounce from "react-use/lib/useDebounce";
import { useMemo, useState, Dispatch, SetStateAction } from "react";
import Fuse, { FuseOptions } from "fuse.js";
export default <T>(
data: ReadonlyArray<T>,
fuseOptions: FuseOptions<T>,
debounce: number = 500
): [ReadonlyArray<T>, string, Dispatch<SetStateAction<string>>] => {
const [filteredData, setFilteredData] = useState(data);
Kód: BMEVIAUA035
01E19t
01L19t
Kód: BMEGEMMBXM2
M1
E
Kód: BMEVIAUA036
01L19t
/*!
* Datetimepicker for Bootstrap 3
* version : 4.17.37
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
list-style: none;
```````#@@@#+,` `````````````````````````@@@@@@@@@@@@@@@@@@@..```````..`
```````#@@@@@@@@@@@@@@@@@@@#;,`````````;@@@@@@@@@@@@@@@@@@@@@#+`````````
```````#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@#@#```````
```````+@@@@@@@@@@@@@@@@@@@@::+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:`,`````
````````:;.,+#@@@@@@@@@@@@@@###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.``````
````````,....``````````````..;+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@``````
```` ,``````````````````````````.+@@@@@@@@@@@@@@@@@@@@@@@@@@@@+``````
`,``````````````````.```````,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,`````
,`````````, ```````````````:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'`````
.`````.````,`.``````:`.,,.`+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#`````