Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ module.exports = {
files: ['**/*.{ts,tsx}'],

parserOptions: {
project: './tsconfig.json',
project: [
'./tsconfig.json',
'./example/tsconfig.json',
'./plugin/src/__tests__/tsconfig.eslint.json',
],
},
plugins: ['@typescript-eslint'],
extends: [
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Lint
run: yarn lint

- name: Type check
run: yarn type:check

- name: Test
run: yarn unittest

Expand Down
11 changes: 11 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@rnmapbox/maps": ["../"],
"react": ["./node_modules/@types/react"],
}
},
"include": ["index.js", "src/**/*", "../index.ts", "../javascript/**/*"]
}
5 changes: 4 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {
FeatureCollection,
} from '@turf/helpers';

import type { requestAndroidLocationPermissions as _requestAndroidLocationPermissions } from './javascript/requestAndroidLocationPermissions';

// prettier-ignore
type ExpressionName =
// Types
Expand Down Expand Up @@ -108,7 +110,8 @@ declare namespace MapboxGL {
function getAccessToken(): Promise<string>;
function setTelemetryEnabled(telemetryEnabled: boolean): void;
function setConnected(connected: boolean): void;
function requestAndroidLocationPermissions(): Promise<boolean>;

const requestAndroidLocationPermissions = _requestAndroidLocationPermissions;

const offlineManager: OfflineManager;
const snapshotManager: SnapshotManager;
Expand Down
Loading