type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
TypeAliasDeclaration
export type MccRatio = { numerator?: MccQuantity; denominator?: MccQuantity; }
MccCareplan/patientsmartapp
src/app/generated-data-api/models/MccRatio.ts
TypeScript
ClassDeclaration
export default class Quote extends React.Component<QuoteProps> { render() { return ( <section className="row quote"> <Container className="quote__container"> <div className="align-self-center"> <h2>Damn cool section in the markup pro...
Nesuarg/nesuarg_nu
src/components/Quote.tsx
TypeScript
InterfaceDeclaration
export interface QuoteProps { }
Nesuarg/nesuarg_nu
src/components/Quote.tsx
TypeScript
MethodDeclaration
render() { return ( <section className="row quote"> <Container className="quote__container"> <div className="align-self-center"> <h2>Damn cool section in the markup process. Now i have no clue what to type.</h2> </div> ...
Nesuarg/nesuarg_nu
src/components/Quote.tsx
TypeScript
ArrowFunction
(item) => item === aggFuncName
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
ArrowFunction
(cellRange) => { // get starting and ending row, remember rowEnd could be before rowStart let startRow = cellRange.start.getGridRow(); let endRow = cellRange.end.getGridRow(); let startRowIsFirst = startRow.before(endRow); let currentRo...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
ArrowFunction
(column) => { // we only want to include each cell once, in case a cell is in multiple ranges let cellId = currentRow.getGridCell(column).createId(); if (cellsSoFar[cellId]) { return; } ...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
@PreConstruct private preConstruct(): void { this.instantiate(this.context); }
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
@PostConstruct private postConstruct(): void { if (!this.isValidRowModel()) { console.warn(`ag-Grid: agSelectedRowCountComponent should only be used with the client and server side row model.`); return; } this.eventService.addEventListener(Events.EVENT_RANGE_SELECTI...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
private isValidRowModel() { // this component is only really useful with client or server side rowmodels const rowModelType = this.gridApi.getModel().getType(); return rowModelType === 'clientSide' || rowModelType !== 'serverSide'; }
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
public init() { }
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
private setAggregationComponentValue(aggFuncName: string, value: number, visible: boolean) { let statusBarValueComponent = this.getAggregationValueComponent(aggFuncName); if (_.exists(statusBarValueComponent)) { statusBarValueComponent.setValue(_.formatNumberTwoDecimalPlacesAndCommas(value)...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
private getAggregationValueComponent(aggFuncName: string): NameValueComp { // converts user supplied agg name to our reference - eg: sum => sumAggregationComp let refComponentName = `${aggFuncName}AggregationComp`; // if the user has specified the agAggregationPanelComp but no aggFuncs we show...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
private onRangeSelectionChanged(): void { let cellRanges = this.rangeController.getCellRanges(); let sum = 0; let count = 0; let numberCount = 0; let min: number = null; let max: number = null; let cellsSoFar: any = {}; if (!_.missingOrEmpty(cellRanges...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
MethodDeclaration
private getRowNode(gridRow: GridRow): RowNode { switch (gridRow.floating) { case Constants.PINNED_TOP: return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex]; case Constants.PINNED_BOTTOM: return this.pinnedRowModel.getPinnedBottomRowData()[gr...
JayceeZ/ag-grid
packages/ag-grid-enterprise/src/statusBar/providedPanels/aggregationComp.ts
TypeScript
ClassDeclaration
@Component({ selector: 'home', // <home></home> providers: [ ], styleUrls: [ './home.component.css' ], templateUrl: './home.component.html' }) export class HomeComponent implements OnInit { public localState = { value: '' }; constructor( public appState: AppState, private router: Router ) {} p...
movshov/VA-Audiology-App
src/app/home/home.component.ts
TypeScript
MethodDeclaration
public ngOnInit() { console.log('hello `Home` component'); /** * this.title.getData().subscribe(data => this.data = data); */ }
movshov/VA-Audiology-App
src/app/home/home.component.ts
TypeScript
MethodDeclaration
/** * This function is called when the wither of those two button on the screen is clicked. * It routes the page to the "log in" page, and also creates a console log to inform the * develop that the button was pressed successfully. */ public patientOnClick() { this.router.navigateByUrl('/login'); co...
movshov/VA-Audiology-App
src/app/home/home.component.ts
TypeScript
ClassDeclaration
@customElement("dialog-media-player-browse") class DialogMediaPlayerBrowse extends LitElement { @property({ attribute: false }) public hass!: HomeAssistant; @state() private _navigateIds?: MediaPlayerItemId[]; @state() private _params?: MediaPlayerBrowseDialogParams; public showDialog(params: MediaPlayerBro...
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
InterfaceDeclaration
interface HTMLElementTagNameMap { "dialog-media-player-browse": DialogMediaPlayerBrowse; }
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
MethodDeclaration
public showDialog(params: MediaPlayerBrowseDialogParams): void { this._params = params; this._navigateIds = [ { media_content_id: this._params.mediaContentId, media_content_type: this._params.mediaContentType, }, ]; }
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
MethodDeclaration
public closeDialog() { this._params = undefined; this._navigateIds = undefined; fireEvent(this, "dialog-closed", { dialog: this.localName }); }
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
MethodDeclaration
protected render(): TemplateResult { if (!this._params) { return html``; } return html` <ha-dialog open scrimClickAction escapeKeyAction hideActions flexContent @closed=${this.closeDialog} > <ha-media-player-browse dialog ...
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
MethodDeclaration
private _mediaBrowsed(ev) { this._navigateIds = ev.detail.ids; }
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
MethodDeclaration
private _mediaPicked(ev: HASSDomEvent<MediaPickedEvent>): void { this._params!.mediaPickedCallback(ev.detail); if (this._action !== "play") { this.closeDialog(); } }
NicoOosterwijk/frontend
src/components/media-player/dialog-media-player-browse.ts
TypeScript
ClassDeclaration
export class CreateUserTokenDto { @IsString() token: string; @IsString() userId: mongoose.Types.ObjectId; @IsDateString() expireAt: string; }
PawelNackiewicz/LD-backend
src/token/dto/create-user-token.dto.ts
TypeScript
ArrowFunction
(options: UnoOptions = {}): Preset<Theme> => ({ name: '@unocss/preset-wind', theme, rules, shortcuts: [ ...containerShortcuts, ], variants: [ ...miniVariants, ...variantColorsScheme, ...options.dark === 'media' ? variantColorsMedia : variantColorsClass, ], options, })
xiaoluoboding/unocss
packages/preset-wind/src/index.ts
TypeScript
InterfaceDeclaration
export interface UnoOptions { /** * @default 'class' */ dark?: 'class' | 'media' }
xiaoluoboding/unocss
packages/preset-wind/src/index.ts
TypeScript
ClassDeclaration
// Base component to override to provide // custom component rendered in table cell @Component({ selector: '[uiDetailTableCell]', template: ` <div [@slideUpDown]="visible ? 'expanded':'collapsed'" (@slideUpDown.done)="onAnimationStop($event)" style="display: block; overflow: hidden"> ...
exodussystem/ngx-ui-ext
src/table/details/detail-table-cell.component.ts
TypeScript
MethodDeclaration
// ------------------------------------------------------------------------- // Lifecycle listeners // ------------------------------------------------------------------------- // implements OnInit ngOnInit(): void { if (this.state && this.state.config && this.state.config.rowConfig ...
exodussystem/ngx-ui-ext
src/table/details/detail-table-cell.component.ts
TypeScript
MethodDeclaration
// implements OnDestroy ngOnDestroy(): void { // cleanup - destroy previously created component if (this._cmpRef) this._cmpRef.destroy(); }
exodussystem/ngx-ui-ext
src/table/details/detail-table-cell.component.ts
TypeScript
MethodDeclaration
public onAnimationStop(event: AnimationEvent) { // entering animation finished if (event.toState === 'expanded') { this.onToggle.emit(true); } // exiting animation finished else if (event.toState === 'collapsed') { this.onToggle.emit(false); } ...
exodussystem/ngx-ui-ext
src/table/details/detail-table-cell.component.ts
TypeScript
ClassDeclaration
@Injectable() export class SongsService { constructor( @InjectRepository(SongRepository) private songRepository: SongRepository, ) {} async getAllSongs(): Promise<Song[]> { const found: Song[] = await this.songRepository.find(); if (!found) { throw new NotFoundException(`Songs not found`);...
melvynrouault/NestProjectMusic
src/songs/songs.service.ts
TypeScript
MethodDeclaration
async getAllSongs(): Promise<Song[]> { const found: Song[] = await this.songRepository.find(); if (!found) { throw new NotFoundException(`Songs not found`); } return found; }
melvynrouault/NestProjectMusic
src/songs/songs.service.ts
TypeScript
MethodDeclaration
async getSongById(id: number): Promise<Song> { const found = await this.songRepository.findOne(id); if (!found) { throw new NotFoundException(`Song with ID ${id} not found`); } return found; }
melvynrouault/NestProjectMusic
src/songs/songs.service.ts
TypeScript
MethodDeclaration
async createSong(createSongDto: CreateSongDto) { const insert = await this.songRepository.createSong(createSongDto); if (!insert) { throw new Error('Song not inserted'); } return insert; }
melvynrouault/NestProjectMusic
src/songs/songs.service.ts
TypeScript
MethodDeclaration
async deleteSongById(id: number): Promise<void> { const deleted = await this.songRepository.delete(id); if (deleted.affected === 0) { throw new NotFoundException(`Song with ID "${id}" not found`); } }
melvynrouault/NestProjectMusic
src/songs/songs.service.ts
TypeScript
FunctionDeclaration
function getColorMap<T extends string | number>(name: ColorMapName) { const colorMap = mapOfColorMaps.get(name) || writable<ColorMap<T>>({}) function resetColors(event: KeyboardEvent) { if (event.key === 'r') { colorMap.set({}) } } return { ...colorMap, ...
MikeDepies/NeatKotlin
Client/src/store/ColorMapStore.ts
TypeScript
FunctionDeclaration
function resetColors(event: KeyboardEvent) { if (event.key === 'r') { colorMap.set({}) } }
MikeDepies/NeatKotlin
Client/src/store/ColorMapStore.ts
TypeScript
FunctionDeclaration
function getColor<T extends string | number>(clockId: T, colorMap: ColorMap<T>) { if (colorMap[clockId]) { return colorMap[clockId]!! } else { colorMap[clockId] = [Math.floor(Math.random() * 256), Math.floor(Math.random() * 256), Math.floor(Math.random() * 256)] return colorMap[clockId]...
MikeDepies/NeatKotlin
Client/src/store/ColorMapStore.ts
TypeScript
FunctionDeclaration
function rgbColorString(rgb: [number, number, number]) { return `rgb(${rgb.join(",")})` }
MikeDepies/NeatKotlin
Client/src/store/ColorMapStore.ts
TypeScript
TypeAliasDeclaration
export type ColorMap<T extends string | number> = { [K in T]?: [number, number, number] }
MikeDepies/NeatKotlin
Client/src/store/ColorMapStore.ts
TypeScript
TypeAliasDeclaration
type ColorMapName = "clocks" | "species"
MikeDepies/NeatKotlin
Client/src/store/ColorMapStore.ts
TypeScript
ClassDeclaration
@NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule], }) export class CekOnkirPageRoutingModule {}
Mrian07/Cctvgrosir
src/app/pages/cek-onkir/cek-onkir-routing.module.ts
TypeScript
InterfaceDeclaration
interface Room { numDoors: number ceilingHeightFt: number }
jungjuyoung/Typescript
ch02/11/02.ts
TypeScript
ClassDeclaration
/** * A concrete Observable map for JSON data. */ export class ObservableJSON extends ObservableMap<JSONValue> { /** * Construct a new observable JSON object. */ constructor(options: ObservableJSON.IOptions = {}) { super({ itemCmp: JSONExt.deepEqual, values: options.values }); } /**...
charnpreetsingh/jupyterlab
packages/coreutils/src/observablejson.ts
TypeScript
ClassDeclaration
/** * An observable JSON change message. */ export class ChangeMessage extends Message { /** * Create a new metadata changed message. */ constructor(args: IObservableJSON.IChangedArgs) { super('jsonvalue-changed'); this.args = args; } /** * The arguments of the change...
charnpreetsingh/jupyterlab
packages/coreutils/src/observablejson.ts
TypeScript
InterfaceDeclaration
/** * An observable JSON value. */ export interface IObservableJSON extends IObservableMap<JSONValue> { /** * Serialize the model to JSON. */ toJSON(): JSONObject; }
charnpreetsingh/jupyterlab
packages/coreutils/src/observablejson.ts
TypeScript
InterfaceDeclaration
/** * The options use to initialize an observable JSON object. */ export interface IOptions { /** * The optional intitial value for the object. */ values?: JSONObject; }
charnpreetsingh/jupyterlab
packages/coreutils/src/observablejson.ts
TypeScript
TypeAliasDeclaration
/** * A type alias for observable JSON changed args. */ export type IChangedArgs = ObservableMap.IChangedArgs<JSONValue>;
charnpreetsingh/jupyterlab
packages/coreutils/src/observablejson.ts
TypeScript
MethodDeclaration
/** * Serialize the model to JSON. */ toJSON(): JSONObject { let out: JSONObject = Object.create(null); for (let key of this.keys()) { let value = this.get(key); if (JSONExt.isPrimitive(value)) { out[key] = value; } else { out[key] = JSON.parse(JSON.stringify(value)); ...
charnpreetsingh/jupyterlab
packages/coreutils/src/observablejson.ts
TypeScript
ArrowFunction
({ ancestors, translate: t = title => title, data, onChange }) => { const [cache, setCache] = useState(data); const { comType, options, disabled, label, ...rest } = cache; const debouncedDataChange = useMemo( () => debounce(value => { onChange?.(ancestors, value, options?.needRefre...
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
ArrowFunction
title => title
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
ArrowFunction
() => debounce(value => { onChange?.(ancestors, value, options?.needRefresh); }, 500)
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
ArrowFunction
value => { onChange?.(ancestors, value, options?.needRefresh); }
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
ArrowFunction
p => p.theme.textColorSnd
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
ArrowFunction
p => p.theme.emphasisBackground
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
MethodDeclaration
t(data?.label, true)
byc233518/datart
frontend/src/app/components/FormGenerator/Basic/BasicInput.tsx
TypeScript
FunctionDeclaration
export default function AccountPage({ user, geojson, handlePhotoClick, handleClose, config }: Props) { const classes = useStyles(); const calcUrl = useCallback( (feature: Feature): string => { const mapLocation = new MapLocation( feature.geometry.coordinates[1], feature.geometr...
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(theme) => ({ avatar: { margin: 10, height: 100, width: 100 }, row: { display: "flex", width: "100%" }, wrapper: { alignItems: "center" }, missionsWrapper: { alignItems: "left", width: "100%", boxSizing: "border-box", padding: 20 }, missionsTitle: { padding...
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(feature: Feature): string => { const mapLocation = new MapLocation( feature.geometry.coordinates[1], feature.geometry.coordinates[0], config.ZOOM_FLYTO ); const urlFormated = mapLocation.urlFormated(); return `${config.PAGES.displayPhoto.path}/${feature.properties.id}@$...
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(f) => f.properties.owner_id === user.id
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(f) => f.properties.pieces > LARGE_COLLECTION_THRESHOLD
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(o) => o.properties.moderated
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(o) => o.properties.pieces
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(mission: MissionFirestoreData) => userOnMissionLeaderboard(mission, user.id) && !mission.hidden
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(f) => f.properties.pieces
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(photo) => ( <Typography variant="body1"
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(mission) => ( <MissionThumbnail key={mission.id}
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
InterfaceDeclaration
interface Props { user: User; geojson: Geojson; handlePhotoClick: (feature: Feature) => void; handleClose: () => void; config: Config; }
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
MethodDeclaration
calcUrl(photo)
PlasticPatrol/PlasticPatrolWeb
src/pages/account/AccountPage.tsx
TypeScript
ArrowFunction
(props: WaitProps) => { return ( <ScriptBlockContainer> <ScriptTypeDropdown value={props.currentData.type} onChange={(value: string)
EliasRut/Game-Dev-2020-10-0304
src/site/components/ScriptBlockTypes/Wait.tsx
TypeScript
InterfaceDeclaration
export interface WaitProps { currentData: { type: 'wait'; time: number; }; updateData: (newData: any) => void; removeData: () => void; }
EliasRut/Game-Dev-2020-10-0304
src/site/components/ScriptBlockTypes/Wait.tsx
TypeScript
FunctionDeclaration
export function StoreProvider(props: any) { const [state, dispatch] = useReducer(mainReducer, newState); const value = { state, dispatch }; return <Store.Provider value={value}>{props.children}</Store.Provider>; }
Jaze23/catmash-nodejs-react
src/front/src/common/config/state/Store.tsx
TypeScript
ArrowFunction
({ globalHelper }: State, action: Action<any>) => ({ globalHelper: globalHelperReducer(globalHelper, action) })
Jaze23/catmash-nodejs-react
src/front/src/common/config/state/Store.tsx
TypeScript
ArrowFunction
() => useContext(Store)
Jaze23/catmash-nodejs-react
src/front/src/common/config/state/Store.tsx
TypeScript
ArrowFunction
(resolve, reject) => { if (this.authenticationModalShown) { resolve(this.authenticated) } Log.info('authenticate') this.authenticationModalShown = true const manager = this const closeHandler = () => { manager.authenticated = false manager.authenticationMod...
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
ArrowFunction
() => { manager.authenticated = false manager.authenticationModalShown = false resolve(false) }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
ArrowFunction
(to: Route, from: Route, next: NavigationGuardNext) => { if (!((to.meta.needsAuthentication || false) && !this.authenticated)) { next() return } next(false) this.showAuthenticationModal().then(authenticated => { if (!authenticated) { return } ...
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
ArrowFunction
authenticated => { if (!authenticated) { return } this.$router.push({ name: to.name || 'welcome', params: to.params }) }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
ClassDeclaration
class AuthManager { protected authenticated: boolean = false protected authenticationModalShown: boolean = false protected $parent!: Vue protected $router!: VueRouter protected $buefy!: BuefyNamespace public get isAuthenticated (): boolean { return this.authenticated } public injectVue (vue: Vue)...
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public injectVue (vue: Vue): void { this.$parent = vue this.$router = vue.$router this.$buefy = vue.$buefy }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public async authenticate (pin: string): Promise<boolean> { this.authenticated = await this.validateAuthentication(pin) Log.info(this.authenticated ? 'authenticated' : 'authication failed') return this.authenticated }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public lock (): void { if (!this.authenticated) { return } Log.info('lock application') this.authenticated = false if (this.$router.currentRoute.meta.needsAuthentication || false) { this.showAuthenticationModal({ canCancel: false }) } }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public showAuthenticationModal (config: object = {}): Promise<boolean> { return new Promise((resolve, reject) => { if (this.authenticationModalShown) { resolve(this.authenticated) } Log.info('authenticate') this.authenticationModalShown = true const manager = this cons...
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
forgotPin () { Log.info('forgot PIN') }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
authenticated () { manager.authenticationModalShown = false modal.close() resolve(true) }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public async changePin (pin: string): Promise<boolean> { Keytar.setCredentials(Keytar.appService, 'application', pin) this.authenticated = true Log.info('Changed PIN, authenticated') return true }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public async validateAuthentication (pin: string): Promise<boolean> { return await Keytar.getCredentials(Keytar.appService, 'application') === pin }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public registerRouterGuard () { this.authenticated = false this.$router.beforeEach((to: Route, from: Route, next: NavigationGuardNext) => { if (!((to.meta.needsAuthentication || false) && !this.authenticated)) { next() return } next(false) this.showAuthenticationModa...
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public toggleAuthentication (): void { this.authenticated ? this.lock() : this.showAuthenticationModal() }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
public async pinIsSet (): Promise<boolean> { return await Keytar.getCredentials(Keytar.appService, 'application') !== null }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
beforeCreate (): void { vue.prototype.$authManager.injectVue(this) }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
MethodDeclaration
isAuthenticated (): boolean { return vue.prototype.$authManager.isAuthenticated }
BlueReceipt/MyVergies
src/authentication/index.ts
TypeScript
ArrowFunction
() => `Invalid webcam facing mode: ${this.webcamConfig.facingMode}. ` + `Please provide 'user' or 'environment'`
crypt096/crypt0-face-manipulation-app
node_modules/@tensorflow/tfjs-data/src/iterators/webcam_iterator.ts
TypeScript
ArrowFunction
resolve => { // Add event listener to make sure the webcam has been fully initialized. this.webcamVideoElement.onloadedmetadata = () => { resolve(); }; }
crypt096/crypt0-face-manipulation-app
node_modules/@tensorflow/tfjs-data/src/iterators/webcam_iterator.ts
TypeScript
ArrowFunction
track => track.stop()
crypt096/crypt0-face-manipulation-app
node_modules/@tensorflow/tfjs-data/src/iterators/webcam_iterator.ts
TypeScript
ClassDeclaration
/** * Provide a stream of image tensors from webcam video stream. Only works in * browser environment. */ export class WebcamIterator extends LazyIterator<Tensor3D> { private isClosed = true; private stream: MediaStream; private resize = false; private cropSize: [number, number]; private cropBox: Tensor2D;...
crypt096/crypt0-face-manipulation-app
node_modules/@tensorflow/tfjs-data/src/iterators/webcam_iterator.ts
TypeScript
MethodDeclaration
summary() { return `webcam`; }
crypt096/crypt0-face-manipulation-app
node_modules/@tensorflow/tfjs-data/src/iterators/webcam_iterator.ts
TypeScript
MethodDeclaration
// Construct a WebcamIterator and start it's video stream. static async create( webcamVideoElement?: HTMLVideoElement, webcamConfig: WebcamConfig = {}) { if (ENV.get('IS_NODE')) { throw new Error( 'tf.data.webcam is only supported in browser environment.'); } if (!webcamVideoElement) ...
crypt096/crypt0-face-manipulation-app
node_modules/@tensorflow/tfjs-data/src/iterators/webcam_iterator.ts
TypeScript