# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.su>

_realname=typescript
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=5.9.3
pkgrel=1
pkgdesc='JavaScript with syntax for types (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://www.typescriptlang.org/'
msys2_repository_url='https://github.com/microsoft/TypeScript'
msys2_references=(
  'purl: pkg:npm/typescript'
)
license=('spdx:Apache-2.0')
depends=("${MINGW_PACKAGE_PREFIX}-nodejs")
source=("https://registry.npmjs.org/${_realname}/-/${_realname}-${pkgver}.tgz")
sha256sums=('10e108c9cf7d5f2879053dff18515fb405abf2ccef63eaaf017d9c571687a1d3')
noextract=("${_realname}-${pkgver}.tgz")

package() {
  "${MINGW_PREFIX}"/bin/npm install -g \
    --cache "${srcdir}/npm-cache" \
    --prefix "${pkgdir}${MINGW_PREFIX}" \
    "${srcdir}/${_realname}-${pkgver}.tgz"
}
