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
16 changes: 16 additions & 0 deletions examples/readme-quickstart.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2026 Xquik contributors
//
// SPDX-License-Identifier: Apache-2.0

import XTwitterScraper from 'x-twitter-scraper';

// Compile-only mirror of the README quickstart. It intentionally constructs
// the client and request params without sending a network request.
const client = new XTwitterScraper({
apiKey: process.env['X_TWITTER_SCRAPER_API_KEY'],
});

const searchParams: XTwitterScraper.X.TweetSearchParams = { q: 'from:elonmusk', limit: 10 };

void client;
void searchParams;
2 changes: 2 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ set -e

cd "$(dirname "$0")/.."

echo "==> Checking types"
./node_modules/typescript/bin/tsc --project tsconfig.json --noEmit


echo "==> Running tests"
Expand Down