let username: string = "jkirira"
let username: string;let id: number = 5
let company: string = 'Traversy Media'| const randomElement = <T>(xs: T[]): T => { | |
| const randomIndex = Math.floor(Math.random() * xs.length) | |
| return xs[randomIndex] | |
| } | |
| // Example usage | |
| const a = randomElement(['a', 'b', 'c']) | |
| //The values in the array don't have to be the same type. Typescript can infer. | |
| const b = randomElement([1, '2', 3, 4, {id: '1', foo: 'bar'}]) |
| ARG COMPOSER_VERSION=2.2 | |
| #ARG COMPOSER_VERSION=latest | |
| FROM composer:${COMPOSER_VERSION} AS composer | |
| FROM ubuntu:22.04 | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| ARG PHP_VERSION=7.1 |
| [ | |
| "Hello": "World", | |
| "Como": [ | |
| "Estas": "Si", | |
| "Esta": "Bien" | |
| ] | |
| ] |
| require('jsdom-global')() | |
| const assert = require('assert') | |
| import UserLogin from "../../../components/UserLogin"; | |
| import { mount } from '@vue/test-utils' | |
| describe("login", () => { | |
| let component; | |
| const wrapper = mount(UserLogin) |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0" /> | |
| <title>codesandbox</title> | |
| </head> | |
| <body> | |