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
import inspect | |
from typing import Any, Callable, ClassVar, List, Type, TypeVar, Union, get_type_hints | |
from fastapi import APIRouter, Depends | |
from starlette.routing import Route, WebSocketRoute | |
T = TypeVar("T") | |
def cbv(router: APIRouter) -> Callable[[Type[T]], Type[T]]: |
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
new Promise(resolve => { | |
var offset = -100; | |
let pageScroll = () => { | |
window.scrollBy(0, 50); | |
if (window.pageYOffset === offset) { | |
return resolve(true); | |
} | |
offset = window.pageYOffset; | |
setTimeout(pageScroll, 50); |