Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
79 lines
1.7 KiB
TypeScript
79 lines
1.7 KiB
TypeScript
import * as stream from 'stream';
|
|
|
|
declare const isStream: {
|
|
/**
|
|
@returns Whether `stream` is a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
|
|
|
|
@example
|
|
```
|
|
import * as fs from 'fs';
|
|
import isStream = require('is-stream');
|
|
|
|
isStream(fs.createReadStream('unicorn.png'));
|
|
//=> true
|
|
|
|
isStream({});
|
|
//=> false
|
|
```
|
|
*/
|
|
(stream: unknown): stream is stream.Stream;
|
|
|
|
/**
|
|
@returns Whether `stream` is a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
|
|
|
|
@example
|
|
```
|
|
import * as fs from 'fs';
|
|
import isStream = require('is-stream');
|
|
|
|
isStream.writable(fs.createWriteStrem('unicorn.txt'));
|
|
//=> true
|
|
```
|
|
*/
|
|
writable(stream: unknown): stream is stream.Writable;
|
|
|
|
/**
|
|
@returns Whether `stream` is a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
|
|
|
|
@example
|
|
```
|
|
import * as fs from 'fs';
|
|
import isStream = require('is-stream');
|
|
|
|
isStream.readable(fs.createReadStream('unicorn.png'));
|
|
//=> true
|
|
```
|
|
*/
|
|
readable(stream: unknown): stream is stream.Readable;
|
|
|
|
/**
|
|
@returns Whether `stream` is a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
|
|
|
|
@example
|
|
```
|
|
import {Duplex} from 'stream';
|
|
import isStream = require('is-stream');
|
|
|
|
isStream.duplex(new Duplex());
|
|
//=> true
|
|
```
|
|
*/
|
|
duplex(stream: unknown): stream is stream.Duplex;
|
|
|
|
/**
|
|
@returns Whether `stream` is a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
|
|
|
|
@example
|
|
```
|
|
import * as fs from 'fs';
|
|
import Stringify = require('streaming-json-stringify');
|
|
import isStream = require('is-stream');
|
|
|
|
isStream.transform(Stringify());
|
|
//=> true
|
|
```
|
|
*/
|
|
transform(input: unknown): input is stream.Transform;
|
|
};
|
|
|
|
export = isStream;
|